From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Volpiatto Subject: Re: Fast traversing directories Date: Sat, 31 Oct 2009 20:16:23 +0100 Message-ID: <87k4ybqsqg.fsf@tux.homenetwork> References: <87skczlc2v.fsf@in-ulm.de> <11278.1257013690@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4JXh-0005l6-AN for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 15:23:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4JXc-0005k2-DQ for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 15:23:16 -0400 Received: from [199.232.76.173] (port=43801 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4JXc-0005jz-7Q for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 15:23:12 -0400 Received: from lo.gmane.org ([80.91.229.12]:39431) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N4JXb-0000sM-Op for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 15:23:12 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N4JXX-0003IK-KH for emacs-orgmode@gnu.org; Sat, 31 Oct 2009 20:23:07 +0100 Received: from 77.197.77.197 ([77.197.77.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Oct 2009 20:23:07 +0100 Received: from thierry.volpiatto by 77.197.77.197 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Oct 2009 20:23:07 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 writes: > andrea Crotti 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