From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: agenda does not call file Date: Thu, 9 Dec 2010 11:13:25 +0100 Message-ID: <40046F48-F51A-4931-AA17-B654E04F4B77@gmail.com> References: <87hbeqyg1d.fsf@lonovo.maison.ici> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=34354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQdWo-0001pl-71 for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 05:15:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQdWh-000687-Ei for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 05:15:05 -0500 Received: from mail-ey0-f177.google.com ([209.85.215.177]:61000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQdWh-00067q-6w for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 05:15:03 -0500 Received: by eyd9 with SMTP id 9so1892124eyd.36 for ; Thu, 09 Dec 2010 02:15:02 -0800 (PST) In-Reply-To: <87hbeqyg1d.fsf@lonovo.maison.ici> 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: maurice@mboucher.info Cc: emacs-orgmode@gnu.org On Dec 6, 2010, at 6:20 PM, maurice@mboucher.info wrote: > Hi org-moders, > > 1 configuration > ~~~~~~~~~~~~~~~ > Below, a piece of my org-agenda-custom-commands. I want to obtain my > notes from my ordinary agenda files and from carto.org. Some of them =20= > are > tagged "note" with the property CATEGORY "openstreetmap" > > ("n" . "Notes") > ("na" "toutes" tags "note" nil) > ("nc" "connexions" > ((tags "CATEGORY=3D\"connexions internet\"+note" > ((org-agenda-remove-tags t)) > ))) > ("no" "osm" > ( > (tags "CATEGORY=3D\"openstreetmap\"+note" > ((org-agenda-remove-tags t))) > (tags "CATEGORY=3D\"openstreetmap\"+note" > ((org-agenda-files '("/home/momo/org/ordi/=20 > carto.org")) > (org-agenda-remove-tags t) > )) > )) Hi Maurice, 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-=20 files))))) This should work because the values in option sections are evaluated before use (which is why you normally would have to quote them). Hope this helps. - Carsten > > > 2 manip1 > ~~~~~~~~ > With C-c a n o, my agenda looks like : > > 2.1 bad > ------- > > ,---- > | Headlines with TAGS match: CATEGORY=3D"openstreetmap"+note > | openstreetmap: osmosis > | openstreetmap: org et osm ou gmap : pour indiquer un lieu > | openstreetmap: Exemple de lettre =E0 l'administration pour =20= > lib=E9rer les donn=E9es > | > | =3D=3D=3D=3D > | Headlines with TAGS match: CATEGORY=3D"openstreetmap"+note > `---- > > > 3 manip2 > ~~~~~~~~ > Now, I load file carto.org and if I lock agenda restriction to this =20= > file > (C-c C-x <) I get : > > 3.1 good > -------- > > ,---- > | Headlines with TAGS match: CATEGORY=3D"openstreetmap"+note > | openstreetmap: Openstreetmap > | openstreetmap: josm et tilecache > | openstreetmap: fichier traces > | openstreetmap: commandes > | openstreetmap: marquage d'un endroit ? > | openstreetmap: cartes v=E9lo et pi=E9tion garmin > | openstreetmap: cartes garmin de Geofabrik > | openstreetmap: commande osmosis > | openstreetmap: OpenStreetMap/OpenLayers and Privoxy > | openstreetmap: Finding all affected URLs > | openstreetmap: Comparing the files > | > | =3D=3D=3D > | Headlines with TAGS match: CATEGORY=3D"openstreetmap"+note > | openstreetmap: Openstreetmap > | openstreetmap: josm et tilecache > | openstreetmap: fichier traces > | openstreetmap: commandes > | openstreetmap: marquage d'un endroit ? > | openstreetmap: cartes v=E9lo et pi=E9tion garmin > | openstreetmap: cartes garmin de Geofabrik > | openstreetmap: commande osmosis > | openstreetmap: OpenStreetMap/OpenLayers and Privoxy > | openstreetmap: Finding all affected URLs > | openstreetmap: Comparing the files > `---- > > > 4 manip3 > ~~~~~~~~ > I "agenda lock agenda restriction remove" ( C-c C-x >), I get : > > 4.1 excellent > ------------- > > ,---- > | Headlines with TAGS match: CATEGORY=3D"openstreetmap"+note > | openstreetmap: osmosis > | openstreetmap: org et osm ou gmap : pour indiquer un lieu > | openstreetmap: Exemple de lettre =E0 l'administration pour =20= > lib=E9rer les donn=E9es > | > | =3D=3D=3D > | Headlines with TAGS match: CATEGORY=3D"openstreetmap"+note > | openstreetmap: Openstreetmap > | openstreetmap: josm et tilecache > | openstreetmap: fichier traces > | openstreetmap: commandes > | openstreetmap: marquage d'un endroit ? > | openstreetmap: cartes v=E9lo et pi=E9tion garmin > | openstreetmap: cartes garmin de Geofabrik > | openstreetmap: commande osmosis > | openstreetmap: OpenStreetMap/OpenLayers and Privoxy > | openstreetmap: Finding all affected URLs > | openstreetmap: Comparing the files > `---- > > > 5 Conclusion > ~~~~~~~~~~~~ > > If I kill the buffer carto.org, I need to repeat manip2 and manip3 to > succeed. Just reloading file carto.org is inefficient. > > I suppose the agenda command does not consider the required file > (carto.org), even if this command loads it - I can see it in list of > buffers. > > Maybe my configuration is wrong and of course, no errors occur at any > time. > > emacs : > GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) > of 2010-11-04 on barber, modified by Debian > > org-mode : > 7.3 > > Thanks for future explanation, > > Maurice > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode