Hi, if you have traverselisp.el, you can use: ,---- | (dolist (d org-directories) | (traverse-walk-directory d :file-fn #'(lambda (x) | (when (string= (file-name-extension x) "org") | (push x org-agenda-files))))) `----
you can get traverselisp.el here: http://www.emacswiki.org/cgi-bin/emacs/traverselisp.el or here: (hg clone) http://mercurial.intuxication.org/hg/traverselisp Nick Dokos <nicholas.do...@hp.com> writes: > andrea Crotti <andrea.crott...@gmail.com> wrote: > >> >> I tried this because I have more base directories. >> (setq org-directories '("~/org" "~/uni")) >> (setq org-agenda-files ()) >> (dolist ((d org-directories)) >> (setq org-agenda-files >> (append org-agenda-files (find-lisp-find-files d "\.org$")))) >> >> >> But it sets org-agenda-files to nil... > > Too many parens: try > > (dolist (d org-directories) > (setq org-agenda-files > (append org-agenda-files (find-lisp-find-files d "\.org$")))) > > Nick > > > > _______________________________________________ > 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 > -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France _______________________________________________ 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