emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Adding org files


From: andrea Crotti
Subject: [Orgmode] Adding org files
Date: Mon, 9 Nov 2009 14:14:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I added this function to my org conf

;; We also want to check that this is actually in base directories
(defun org-add-eventually()
  "Adding a file to org-agenda when saved, with"
  (interactive)
  (if (string= major-mode "org-mode")
      (org-agenda-file-to-front)))

;;TODO: Check if a file is contained in some subdirectories
(add-hook 'before-save-hook 'org-add-eventually)

Looks like it's working and it's really nice, but now
I have something writing a very long list in my init.el

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(org-agenda-files (quote ("~/org/tobuy.org" 
"/Users/andrea/Documents/calzitex/documentazione/doc.org" "/U...


Who is writing it?
And by the way I was thinking exactly to a way to "pickle" the list every time 
I quit emacs.

Given that I only add files with emacs when I restart it would be nice to
 just read the list instead of generating it.

Is that sufficient to write a 
"(setq org-agenda-files "...") every time I save a new org-file or there
are smarter ways (like pickling/marshalling for example)?
Thanks





reply via email to

[Prev in Thread] Current Thread [Next in Thread]