all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trouble setting variables in custom agenda command
@ 2009-05-27  2:05 Christopher DeMarco
  2009-06-03 15:17 ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher DeMarco @ 2009-05-27  2:05 UTC (permalink / raw)
  To: emacs-orgmode

I have the following in my .emacs (long lines, sorry):

    (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-start-with-log-mode t)                                                                 ;; no
                        (org-agenda-ndays 1)                                                                               ;; yes
                        (org-agenda-skip-function                                                                          ;; yes
                         '(org-agenda-skip-entry-if 'notregexp "\\* TODO")))))
               nil nil)))

Why don't the first three variables get set (or at least their effects
aren't visible in the Agenda buffer), but the last two do?

What am I missing in the manual that would have made this clear?

TIA!


-- 
Christopher DeMarco <demarco@maya.com>
IT Director
MAYA Group
+1-412-708-9660

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trouble setting variables in custom agenda command
  2009-05-27  2:05 Trouble setting variables in custom agenda command Christopher DeMarco
@ 2009-06-03 15:17 ` Carsten Dominik
  2009-06-03 18:45   ` Matthew Lundin
  2009-06-03 19:10   ` Bernt Hansen
  0 siblings, 2 replies; 11+ messages in thread
From: Carsten Dominik @ 2009-06-03 15:17 UTC (permalink / raw)
  To: Christopher DeMarco; +Cc: emacs-orgmode

Could anyone please try to reproduce this?

Thanks.

- Carsten

On May 27, 2009, at 4:05 AM, Christopher DeMarco wrote:

> I have the following in my .emacs (long lines, sorry):
>
>    (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-start-with-log-mode  
> t 
> )                                                                 ;;  
> no
>                        (org-agenda-ndays  
> 1 
> )                                                                               ;; yes
>                        (org-agenda-skip- 
> function 
>                                                                           ;; yes
>                         '(org-agenda-skip-entry-if 'notregexp "\\*  
> TODO")))))
>               nil nil)))
>
> Why don't the first three variables get set (or at least their effects
> aren't visible in the Agenda buffer), but the last two do?
>
> What am I missing in the manual that would have made this clear?
>
> TIA!
>
>
> -- 
> Christopher DeMarco <demarco@maya.com>
> IT Director
> MAYA Group
> +1-412-708-9660
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trouble setting variables in custom agenda command
  2009-06-03 15:17 ` Carsten Dominik
@ 2009-06-03 18:45   ` Matthew Lundin
  2009-06-03 19:18     ` Sebastian Rose
  2009-06-03 19:10   ` Bernt Hansen
  1 sibling, 1 reply; 11+ messages in thread
From: Matthew Lundin @ 2009-06-03 18:45 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Christopher DeMarco, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Could anyone please try to reproduce this?
>
> Thanks.
>
> - Carsten
>
> On May 27, 2009, at 4:05 AM, Christopher DeMarco wrote:
>
>> I have the following in my .emacs (long lines, sorry):
>>
>>    (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-start-with-log-mode t )
>> ;;  no
>>                        (org-agenda-ndays 1 )
>> ;; yes
>>                        (org-agenda-skip-
>> function
>>                                                                           ;; yes
>>                         '(org-agenda-skip-entry-if 'notregexp "\\*
>> TODO")))))
>>               nil nil)))
>>
>> Why don't the first three variables get set (or at least their effects
>> aren't visible in the Agenda buffer), but the last two do?
>>
>> What am I missing in the manual that would have made this clear?

I can reproduce this. I evaluated and ran the custom agenda command and
got the last two variables (org-agenda-ndays and
org-agenda-skip-function), but no column view or log view.

- Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trouble setting variables in custom agenda command
  2009-06-03 15:17 ` Carsten Dominik
  2009-06-03 18:45   ` Matthew Lundin
@ 2009-06-03 19:10   ` Bernt Hansen
  2009-06-03 22:26     ` Nick Dokos
  1 sibling, 1 reply; 11+ messages in thread
From: Bernt Hansen @ 2009-06-03 19:10 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Christopher DeMarco, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Could anyone please try to reproduce this?
>
> Thanks.
>
> - Carsten
>

This works as described by Christopher for me.

GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-11-09 on raven, modified by Debian

Org-mode version 6.27trans (release_6.27a-52-g45d80c3)

| Keystrokes                  | Notes                                        |
|-----------------------------+----------------------------------------------|
| emacs -q -l ~/minimal.emacs | Start emacs for testing                      |
| C-x C-f /tmp/x.x            | Visit file with test setting                 |
| M-S->                       | Go to bottom of file                         |
| C-x C-e                     | Execute - setting org-agenda-custom-commands |
| C-c a c                     | Run custom agenda "The Cycle"                |
|-----------------------------+----------------------------------------------|

and it looks like this:

,----[ x.agenda.txt ]
| Day-agenda (W23):
| Wednesday   3 June 2009
|   x:          In  -3 d.:  TODO Test task
|   x:          In   2 d.:  TODO First task
`----

I can turn on log mode with l to get this

,----[ x.agenda.txt ]
| Day-agenda (W23):
| Wednesday   3 June 2009
|                8:00...... ----------------
|   x:           9:10- 9:12 Clocked:   (0:02) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|   x:           9:13- 9:14 Clocked:   (0:01) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|               10:00...... ----------------
|               12:00...... ----------------
|               14:00...... ----------------
|               16:00...... ----------------
|               18:00...... ----------------
|               20:00...... ----------------
|   x:          In  -3 d.:  TODO Test task
|   x:          In   2 d.:  TODO First task
`----

and turn on column mode with C-c C-x C-c to get this

,----[ x.agenda.txt ]
| Day-agenda (W23):
| Wednesday   3 June 2009
|                8:00...... ----------------
|   x:           9:10- 9:12 Clocked:   (0:02) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|   x:           9:13- 9:14 Clocked:   (0:01) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|               10:00...... ----------------
|               12:00...... ----------------
|               14:00...... ----------------
|               16:00...... ----------------
|               18:00...... ----------------
|               20:00...... ----------------
|   x:          In  -3 d.:  TODO Test task
|   x:          In   2 d.:  TODO First task
`----

Test files follow:

,----[ minimal.emacs ]
| (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
| (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
| (require 'org-install)
| (global-set-key "\C-cl" 'org-store-link)
| (global-set-key "\C-ca" 'org-agenda)
| (global-set-key "\C-cb" 'org-iswitchb)
| (setq org-log-done (quote time))
| (setq org-log-into-drawer t)
| (setq org-agenda-files '("/tmp/x.org"))
`----

,----[ x.org ]
| #_STARTUP:
| * TODO First task
|   DEADLINE: <2009-06-05 Fri>
|   - Note taken on [2009-06-03 Wed 14:51] \\
|     some log message
| * QUOTE foo
| Some test quote
| * TODO Test task
| DEADLINE: <2009-05-10 Sun +1w>
| - State "DONE"       from ""           [2009-06-03 Wed 14:50]
| :LOGBOOK:
| CLOCK: [2009-06-03 Wed 09:13]--[2009-06-03 Wed 09:14] =>  0:01
| - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
| - State "DONE"       from "STARTED"    [2009-06-02 Tue 09:12]
| - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:12]
| CLOCK: [2009-06-03 Wed 09:10]--[2009-06-03 Wed 09:12] =>  0:02
| :END:
| * More stuff
`----

,----[ x.x ]
|     (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-start-with-log-mode t)                                                                 ;; no
|                         (org-agenda-ndays 1)                                                                               ;; yes
|                         (org-agenda-skip-function                                                                          ;; yes
|                          '(org-agenda-skip-entry-if 'notregexp "\\* TODO")))))
|                nil nil)))
`----

-Bernt

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: Trouble setting variables in custom agenda command
  2009-06-03 18:45   ` Matthew Lundin
@ 2009-06-03 19:18     ` Sebastian Rose
  2009-06-03 19:42       ` Eric S Fraga, Eric S Fraga
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastian Rose @ 2009-06-03 19:18 UTC (permalink / raw)
  To: Matthew Lundin; +Cc: Christopher DeMarco, emacs-orgmode, Carsten Dominik


Hm - that gives me an error (see below)


I did 

  emacs -Q
  C-x d ~/emacs/lisp/ext/org-mode/lisp/ RET
  marked all *.el files
  S-L (several times, until all files where loaded correctly)
  evaled the OP's code
  evaled my (setq org-agenda-files (quote...)))

  M-x org-agenda RET c



Gives me this message:


let: `let' bindings can have only one value-form: org-agenda-skip-, function, (quote (org-agenda-skip-entry-if (quote notregexp) "\\* TODO"))



Best

   Sebastian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: Trouble setting variables in custom agenda command
  2009-06-03 19:18     ` Sebastian Rose
@ 2009-06-03 19:42       ` Eric S Fraga, Eric S Fraga
  0 siblings, 0 replies; 11+ messages in thread
From: Eric S Fraga, Eric S Fraga @ 2009-06-03 19:42 UTC (permalink / raw)
  To: Sebastian Rose
  Cc: Christopher DeMarco, Matthew Lundin, emacs-orgmode,
	Carsten Dominik

Carsten,

I get the same behaviour as the OP: ndays 1 and only TODOs but no log
mode nor columns mode.  I don't get an error, however.  My org-mode is
current as of yesterday evening.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: Trouble setting variables in custom agenda command
  2009-06-03 19:10   ` Bernt Hansen
@ 2009-06-03 22:26     ` Nick Dokos
  2009-06-03 22:59       ` Nick Dokos
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Dokos @ 2009-06-03 22:26 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Christopher DeMarco, emacs-orgmode, 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: Trouble setting variables in custom agenda command
  2009-06-03 22:26     ` Nick Dokos
@ 2009-06-03 22:59       ` Nick Dokos
  2009-06-04  7:49         ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Dokos @ 2009-06-03 22:59 UTC (permalink / raw)
  To: nicholas.dokos
  Cc: Bernt Hansen, Christopher DeMarco, emacs-orgmode, Carsten Dominik

Nick Dokos <nicholas.dokos@hp.com> wrote:

> [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.
> 

The problem with the column variables is similar but not quite the same:
column view is set in org-finalize, and org-finalize is called *twice*:

The custom commands are executed by org-run-agenda-series, which first
calls org-agenda-list with the (let ...) settings from the definition of
the custom command and which eventually calls org-finalize with the
proper values of the column view variables. But once org-agenda-list
returns to org-run-agenda-series, the latter continues on and calls
org-finalize again with no (let ...) bindings.  The last call wins and
column view loses.

Thanks,
Nick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: Trouble setting variables in custom agenda command
  2009-06-03 22:59       ` Nick Dokos
@ 2009-06-04  7:49         ` Carsten Dominik
  2009-06-04 15:06           ` Christopher DeMarco
  0 siblings, 1 reply; 11+ messages in thread
From: Carsten Dominik @ 2009-06-04  7:49 UTC (permalink / raw)
  To: nicholas.dokos
  Cc: Bernt Hansen, Matthew Lundin, emacs org-mode mailing list,
	Christopher DeMarco

Hi,

wow, what a fantastic response to my request, thank
you all very much for contributing pieces to this puzzle.

There are several issues here.

1. Christopher did define his agenda command incorrectly (I know
    this variable is very complex... ).  You defined the command
    as a block agenda where in principle several agenda lists can
    be combined in a single view.  You can see this by setting
    org-agenda-custom-commands just to the single entry like Bernt
    did in his setup, and then try to customize this variable.

    A block agenda has *two* places where options can be stored.
    One set of options for just the individual command, and one
    set for for the block as a whole.  Things like
    org-agenda-start-with-column-view need to be set there, because
    they are only used in that final cleanup that happens in the
    second call to org-finalize-agenda, as Nick has described.

2. I had a bug for agenda series:  As Nick has pointed out,
    the agenda buffer is created and things like log-mode are set
    up before the options are scoped with let.  I have now fixed
    this, the buffer creation gets the *global* agenda series
    variables scoped as well.  Note: NOT the local ones.

Christopher, after getting the latest release with my fix,
there are now two possibilities how you can write
your command, to achieve what you wanted.

1. As this is only a single block, you can reformulate this
    as a single agenda command, not a series:


    (setq org-agenda-custom-commands
          '(("c" agenda nil
	    (
	     (org-agenda-overriding-columns-format "%75ITEM %7Effort{:}  
%7CLOCKSUM{Total} %15TAGS %SCHEDULED")
	     (org-agenda-view-columns-initially t)
	     (org-agenda-start-with-log-mode t)
	     (org-agenda-ndays 1)
	     (org-agenda-skip-function
	      '(org-agenda-skip-entry-if 'notregexp "\\* TODO"))))))


2. Keep it as a block in an agenda series, but then move the
    variables that are not specific for the block out:

    (setq org-agenda-custom-commands
          '(("c" "The Cycle"
             ((agenda
               ""
               ((org-agenda-ndays 1)
                (org-agenda-skip-function
                 '(org-agenda-skip-entry-if 'notregexp "\\* TODO")))))
             ((org-agenda-overriding-columns-format "%75ITEM  
%7Effort{:} %7CLOCKSUM{Total} %15TAGS %SCHEDULED")
              (org-agenda-view-columns-initially t)
              (org-agenda-start-with-log-mode t)))))


    You may also move all the settings into the global options block
    in this case.

I do realize only now that the reason why you chose a block agenda
may have been so that you could give the command a name, which
is not possible in single commands.  I also realize now that
it was a mistake to not allow for a name also here.
But I am not sure if there is an easy way to fix this
without breaking legacy setups out there.

Thanks again to everyone.

If anyone has good proposals as to where to amend
the documentation in order to avoid this issue,
please let me know.

- Carsten

On Jun 4, 2009, at 12:59 AM, Nick Dokos wrote:

> Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> [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.
>>
>
> The problem with the column variables is similar but not quite the  
> same:
> column view is set in org-finalize, and org-finalize is called  
> *twice*:
>
> The custom commands are executed by org-run-agenda-series, which first
> calls org-agenda-list with the (let ...) settings from the  
> definition of
> the custom command and which eventually calls org-finalize with the
> proper values of the column view variables. But once org-agenda-list
> returns to org-run-agenda-series, the latter continues on and calls
> org-finalize again with no (let ...) bindings.  The last call wins and
> column view loses.
>
> Thanks,
> Nick
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: Trouble setting variables in custom agenda command
  2009-06-04  7:49         ` Carsten Dominik
@ 2009-06-04 15:06           ` Christopher DeMarco
  2009-06-05  1:48             ` Matthew Lundin
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher DeMarco @ 2009-06-04 15:06 UTC (permalink / raw)
  To: emacs org-mode mailing list

On Thu Jun  4 09:49:19 2009 +0200, Carsten Dominik wrote:

>    A block agenda has *two* places where options can be stored.
>    One set of options for just the individual command, and one
>    set for for the block as a whole.  Things like
>    org-agenda-start-with-column-view need to be set there, because
>    they are only used in that final cleanup that happens in the
>    second call to org-finalize-agenda, as Nick has described.

Need to be set "where"?  The options for the individual command or for
the whole block?


> Christopher, after getting the latest release with my fix,

I haven't done this yet, hopefully I'll get to it tonight.

Thanks for the help!


-- 
Christopher DeMarco <demarco@maya.com>
IT Director
MAYA Group
+1-412-708-9660

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trouble setting variables in custom agenda command
  2009-06-04 15:06           ` Christopher DeMarco
@ 2009-06-05  1:48             ` Matthew Lundin
  0 siblings, 0 replies; 11+ messages in thread
From: Matthew Lundin @ 2009-06-05  1:48 UTC (permalink / raw)
  To: Christopher DeMarco; +Cc: emacs org-mode mailing list

Christopher DeMarco <demarco@maya.com> writes:

> On Thu Jun  4 09:49:19 2009 +0200, Carsten Dominik wrote:
>
>>    A block agenda has *two* places where options can be stored.
>>    One set of options for just the individual command, and one
>>    set for for the block as a whole.  Things like
>>    org-agenda-start-with-column-view need to be set there, because
>>    they are only used in that final cleanup that happens in the
>>    second call to org-finalize-agenda, as Nick has described.
>
> Need to be set "where"?  The options for the individual command or for
> the whole block?

I believe the second set of options (b below) -- i.e., the ones that
come at the end of the agenda block command and apply to the block as a
whole.

--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands
      '(("c" "The Cycle"
	 ((agenda
	   ""
           ;; What follows is a) the first set of options.
           ;; They apply to for the agenda command above.        
	   ((org-agenda-ndays 1)      
	    (org-agenda-skip-function
	     '(org-agenda-skip-entry-if 'notregexp "\\* TODO")))))
	 ;; What follows is b) the second set of options.
	 ;; It is for the block as a whole.
         ;; If you had additional commands it would apply to them too.
	 ((org-agenda-overriding-columns-format 
	   "%75ITEM %7Effort{:} %7CLOCKSUM{Total} %15TAGS %SCHEDULED")
	  (org-agenda-view-columns-initially t)
	  (org-agenda-start-with-log-mode t)))))
--8<---------------cut here---------------end--------------->8---

Regards,
Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-06-05  1:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27  2:05 Trouble setting variables in custom agenda command Christopher DeMarco
2009-06-03 15:17 ` Carsten Dominik
2009-06-03 18:45   ` Matthew Lundin
2009-06-03 19:18     ` Sebastian Rose
2009-06-03 19:42       ` Eric S Fraga, Eric S Fraga
2009-06-03 19:10   ` Bernt Hansen
2009-06-03 22:26     ` Nick Dokos
2009-06-03 22:59       ` Nick Dokos
2009-06-04  7:49         ` Carsten Dominik
2009-06-04 15:06           ` Christopher DeMarco
2009-06-05  1:48             ` Matthew Lundin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.