From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Re: Handling org-file agenda dependenncies? Date: Sat, 28 Mar 2009 06:55:53 -0500 Message-ID: References: <938fae2d0903261731p5bbc84e5v12f63e136f868474@mail.gmail.com> <20090327214655.56888aaf@newmanfamily.me.uk> 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 1LnX8s-0007hN-VF for emacs-orgmode@gnu.org; Sat, 28 Mar 2009 07:56:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LnX8n-0007Y2-FM for emacs-orgmode@gnu.org; Sat, 28 Mar 2009 07:56:01 -0400 Received: from [199.232.76.173] (port=38257 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LnX8n-0007Xs-8p for emacs-orgmode@gnu.org; Sat, 28 Mar 2009 07:55:57 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:55926) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LnX8m-0006Z9-T1 for emacs-orgmode@gnu.org; Sat, 28 Mar 2009 07:55:57 -0400 In-Reply-To: (Eraldo Helal's message of "Sat\, 28 Mar 2009 11\:07\:00 +0000 \(UTC\)") 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: Eraldo Helal Cc: emacs-orgmode@gnu.org Hi Eraldo, Eraldo Helal writes: > Mike Newman newmanfamily.me.uk> writes: > >> When you use the standard commands to add/removes files from the >> agenda, it will write a definition for the variable org-agenda-files to >> the custom section of your .emacs file. > > That would still mean removing every org-file in the tree manually > when wanting to make a project "inactive". > >> If you want to deal with trees of files, you might be better off >> removing the variable from the custom section, defining it >> yourself and updating it manually. > > The questions here is... How could one define it? I think you could set something like the following in your .emacs file: --8<---------------cut here---------------start------------->8--- (load-library "find-lisp") (setq org-agenda-files (append (find-lisp-find-files "~/directory1" "\.org$") (find-lisp-find-files "~/directory2" "\.org$") (find-lisp-find-files "~/directory3" "\.org$"))) --8<---------------cut here---------------end--------------->8--- This will search the directories above recursively for org files. Whenever you want to remove a project from your agenda, simply delete the appropriate line and evaluate the expression. I'd imagine someone else can think of a way to do this more economically, though. Best, Matt