Here is a little code snippet for setting up the org-agenda-files variable via elisp code, to only include files modified in the last X days.
I use this, because I have ~500 org files and if I add all of them to org-agenda-files then creating agenda buffers takes up just too much time[1], and it is wasted effort anyway, because I only use a handful of them on a day-to-day basis. ,---- | (defun rk-filter-new-files (max-age files) | "Returns only files that were modified MAX-AGE days ago." | (let ((current-day (time-to-days (current-time)))) | (loop for file in files | for age = (time-to-days (nth 5 (file-attributes file))) | if (< (- current-day age) | max-age) | collect file))) | | (setq org-agenda-files (rk-filter-new-files | 380 | (append (directory-files "~/.xemacs/org/" t nil nil t) | (directory-files "~/.Wiki/" t nil nil t)))) `---- Footnotes: [1] I don't want to add them manually 1-by-1 either. -- Udv, Richard _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode