From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Re: Trouble setting variables in custom agenda command Date: Wed, 03 Jun 2009 18:26:21 -0400 Message-ID: <11098.1244067981@alphaville.usa.hp.com> References: <20090527020507.GA5071@owl.prv.maya.com> <87my8puoa7.fsf@gollum.intra.norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MByvy-0002yx-4J for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 18:27:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MByvt-0002w2-AZ for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 18:27:45 -0400 Received: from [199.232.76.173] (port=34777 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MByvt-0002vp-7k for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 18:27:41 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:47637) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MByvs-0006T2-Rt for emacs-orgmode@gnu.org; Wed, 03 Jun 2009 18:27:41 -0400 In-Reply-To: Message from Bernt Hansen of "Wed, 03 Jun 2009 15:10:08 EDT." <87my8puoa7.fsf@gollum.intra.norang.ca> 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: Bernt Hansen Cc: Christopher DeMarco , emacs-orgmode@gnu.org, Carsten Dominik [Bernt, thanks very much for taking the time to do the set-up: it makes things so much easier!] I've made a little progress debugging this in the case of the org-agenda-start-with-log-mode variable: the doc for it says ,---- | org-agenda-start-with-log-mode is a variable defined in `org-agenda.el'. | Its value is nil | | Documentation: | The initial value of log-mode in a newly created agenda window. | | You can customize this variable. `---- Note that *initial*: it is only used once, in org-agenda-mode, to initialize org-agenda-show-log. So setting it in the definition of an agenda custom command (effectively in a (let ...) form) will not work: org-agenda-mode has been called already by the time the custom command is executed, and the global value of org-agenda-start-with-log-mode has been used to set org-agenda-show-log. Any local binding later on has no effect at all. So the workaround for this variable is to set org-agenda-show-log in the definition of the custom command. The following works as far as the log goes: (setq org-agenda-custom-commands '(("c" "The Cycle" ((agenda "" ( (org-agenda-overriding-columns-format "%75ITEM %7Effort{:} %7CLOCKSUM{Total} %15TAGS %SCHEDULED") ;; no (org-agenda-view-columns-initially t) ;; no (org-agenda-show-log t) ;;yes (org-agenda-ndays 1) ;; yes (org-agenda-skip-function ;; yes '(org-agenda-skip-entry-if 'notregexp "\\* TODO"))))) nil nil))) I presume that a similar problem afflicts the column view variables, but I have not gone there yet. Thanks, Nick