From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Julian M. Burgos" Subject: Re: Multiple Recursive Directories with org-agenda-files Date: Tue, 15 Apr 2014 09:43:43 +0100 Message-ID: References: <87d2gj34a3.fsf@quasar.esben-stien.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZzu9-0004nt-1W for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 05:43:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZzu3-0007XJ-4s for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 05:43:48 -0400 Received: from hafgarpur.hafro.is ([130.208.64.48]:40323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZzu2-0007VF-TZ for emacs-orgmode@gnu.org; Tue, 15 Apr 2014 05:43:43 -0400 In-reply-to: <87d2gj34a3.fsf@quasar.esben-stien.name> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Esben Stien Cc: emacs-orgmode@gnu.org Hi Esben, I use find-lisp-find-files. I have the following in my .emacs file:=20 ;;-----------------------------------------------------------------------= ------- ;; Load org agenda files ;;-----------------------------------------------------------------------= ------- (load-library "find-lisp") (add-hook 'org-agenda-mode-hook (lambda ()=20 (setq org-agenda-files=20 (find-lisp-find-files "/home/julian/Documents" "\.org$")) )) With this when I do C-c a, all the *.org files in my Documents directory get added into the agenda. According to this http://archive.today/7McXW#selection-9101.0-9101.4 If you are on a Linux machine you can use the find utility, which can be faster that the lisp library: (setq org-agenda-files (mapcar 'abbreviate-file-name (split-string (shell-command-to-string "find ~/org -name \"*.org\"") "\n"))) I have not tried it though... but I may do it now. I hope this helps. Julian Esben Stien writes: > I'm trying to add a few recursive directories to org-agenda-files, but > can't really find any examples doing this=20 > > I got like 250 org files spread over a few directories. > > I want to add: > > ~/foo/bar/ > ~/baz/quux/ > ~/hukarz/grault/ > > ..which again includes multiple directories with .org files and a few > other files which I don't want included. > > Anyone who does this? --=20 Julian Mariano Burgos, PhD Hafranns=C3=B3knastofnun/Marine Research Institute Sk=C3=BAlagata 4, 121 Reykjav=C3=ADk, Iceland S=C3=ADmi/Telephone : +354-5752037 Br=C3=A9fs=C3=ADmi/Telefax: +354-5752001 Netfang/Email: julian@hafro.is