From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maurice Boucher Subject: Re: agenda does not call file Date: Thu, 09 Dec 2010 17:31:53 +0100 Message-ID: <878vzy9abq.fsf@lonovo.maison.ici> References: <87hbeqyg1d.fsf@lonovo.maison.ici> <40046F48-F51A-4931-AA17-B654E04F4B77@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=38896 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQjMy-00018V-K3 for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 11:29:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQjMu-0001Ju-BX for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 11:29:24 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]:57110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQjMt-0001JX-PP for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 11:29:20 -0500 In-Reply-To: <40046F48-F51A-4931-AA17-B654E04F4B77@gmail.com> (Carsten Dominik's message of "Thu, 9 Dec 2010 11:13:25 +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: Carsten Dominik Cc: emacs-orgmode@gnu.org Hi Carsten, Carsten Dominik =C3=A9crivit : > you have discovered that in a block agenda view, it > is only possible to *restrict* the range of files > used in a block, not to widen it. I was not aware > myself of this restriction, but looking at the code > I see it is there. > > The reason for this is that, in order to speed things up, > Org does some prep work on the agenda files before parsing > for the different blocks. At that prep stage, all the files > are pulled in. > > So you can get this to work by setting the list of agenda > files to all agenda files plus the extra file in the *global* > option section for this custom command. > > The following might work (untested): > > ("no" "osm" > ((tags "CATEGORY=3D\"openstreetmap\"+note" > ((org-agenda-remove-tags t))) > (tags "CATEGORY=3D\"openstreetmap\"+note" > ((org-agenda-files '("/home/momo/org/ordi/carto.org")) > (org-agenda-remove-tags t) > ))) > ((org-agenda-files (cons "/home/momo/org/ordi/carto.org" (org-agenda- > files))))) > > > This should work because the values in option sections are > evaluated before use (which is why you normally would > have to quote them). Thanks for your answer. Your code is right but it gives twice the same agenda and it was not my goal. I want to recognize which are the files my notes come from. I add a filetag "carto" on my file carto.org to separate the agenda view and with your example, I rewrite my command : ("no" "osm" ((tags "CATEGORY=3D\"openstreetmap\"+note" ((org-agenda-remove-tags t))) (tags "CATEGORY=3D\"openstreetmap\"+carto" ((org-agenda-files '("/home/momo/org/ordi/carto.org")) (org-agenda-remove-tags t) ))) ((org-agenda-files (cons "/home/momo/org/ordi/carto.org" (org-agenda-files))))) I use to put notes about the same subject in different files or sections like "answer mail", "program". I just keep important and definitive notes in special files (here "carto.org"). By this way I can see and reorganize all of them. I think the most difficult about org-mode is not about configuration - documentation, faqs, tutorials are very good - but about organizing files, todo, tags, etc. in the best way to keep these objects small, simple and well structured.=20 Bye, Maurice