From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Griswold Subject: Re: how to change the set of agenda org files between custom agenda commands Date: Wed, 24 Sep 2008 22:54:49 -0400 Message-ID: <87vdwlc4ue.fsf@cantor.griswold.home> References: <87iqsmwj0b.fsf@cantor.griswold.home> <48DAB052.1080102@diplan.de> 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 1Kih0W-0006MT-Cu for emacs-orgmode@gnu.org; Wed, 24 Sep 2008 22:55:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kih0T-0006Lf-O7 for emacs-orgmode@gnu.org; Wed, 24 Sep 2008 22:55:07 -0400 Received: from [199.232.76.173] (port=45834 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kih0T-0006Lb-Kp for emacs-orgmode@gnu.org; Wed, 24 Sep 2008 22:55:05 -0400 Received: from main.gmane.org ([80.91.229.2]:48649 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kih0T-0008MK-3V for emacs-orgmode@gnu.org; Wed, 24 Sep 2008 22:55:05 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Kih0K-0006v6-Il for emacs-orgmode@gnu.org; Thu, 25 Sep 2008 02:54:56 +0000 Received: from cpe-67-242-215-243.rochester.res.rr.com ([67.242.215.243]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Sep 2008 02:54:56 +0000 Received: from dgriswol by cpe-67-242-215-243.rochester.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Sep 2008 02:54:56 +0000 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 Rainer Stengele writes: > Dan, thank you. I somehow does and doesn't. > After using the command I get the "private" entries. > After using another command analogous to this it seems I cannot reset > the org-agenda-files variable. Looks like it only adds files to it? > I played around a lot but could not get it to function as wanted. > > Anyway, the syntax is quite complex. > I wonder if some more examples for changing agenda files when > executing custom commands would be helpful. > Anyone else who wants to see Agenden at home from different sets of > agenda files? > > Rainer Rainer, I came across the variable org-finalize-agenda-hook, which is "run just before displaying an agenda buffer." So, maybe something like this in your configuration will work: (defun rs-reset-agenda-files () "Set org-agenda-files to my default values" (interactive) (setq org-agenda-files ; the following are examples, of course (quote ("~/org/PUBLIK/work1.org" "~/org/PUBLIK/work2.org" "~/org/PUBLIK/work3.org")))) (add-hook 'org-finalize-agenda-hook 'rs-reset-agenda-files) What I think might then happen is that, after you run agenda custom command kP, the variable org-agenda-files will be reset to the default value. Maybe? Dan -- -------------- Dan Griswold Rochester, NY --------------