Fix bug when redoing multiple (agenda) blocks.
commit424f3ecedbea0117fb7008e686a897276936a1d7
authorBastien Guerry <bzg@altern.org>
Mon, 27 Aug 2012 15:52:22 +0000 (27 17:52 +0200)
committerBastien Guerry <bzg@altern.org>
Mon, 27 Aug 2012 15:52:22 +0000 (27 17:52 +0200)
tree19b8a887805851ef5c70c66dc656f0cb3a6b2eb7
parent857b980515000c6b2f37965085cf313e5723de34
Fix bug when redoing multiple (agenda) blocks.

* org-agenda.el (org-agenda-overriding-cmd)
(org-agenda-multi-current-cmd)
(org-agenda-multi-overriding-arguments): New variables.
(org-agenda-run-series): `org-agenda-overriding-arguments'
defaults to the last agenda block arguments, so don't use it
globally.
(org-agenda-mark-header-line): Add properties needed so that
`org-agenda-overriding-arguments', `org-agenda-current-span'
and `org-agenda-last-arguments' can be set to their correct
contextual value.
(org-agenda-multi-back-to-pos): New variable.
(org-agenda-later): Retrieve `org-agenda-current-span' and
`org-agenda-overriding-arguments' from text properties.  Also
handle numeric span.
(org-agenda-later, org-agenda-change-time-span): Set
`org-agenda-overriding-cmd' so that we to take overriding
arguments into account for this command only.

The behavior for agenda blocks where there is only one (agenda)
command is not changed.  Changing the time span and redoing with
`g' will keep the new time span.  The behavior changed for blocks
where there are multiples (agenda) blocks.  In this case, redoing
will restore the initial view (before any time span change) and
changing the time span is done independantly for each block.

Thanks to Charles Philip Chan for reporting this nasty bug.
lisp/org-agenda.el