Improve feedback when completing repeated tasks from agenda view.
commit0bbf3a9bd69d8436841dbea32423516da3117c81
authorCarsten Dominik <carsten.dominik@gmail.com>
Mon, 3 Nov 2008 07:36:30 +0000 (3 08:36 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Mon, 3 Nov 2008 07:36:30 +0000 (3 08:36 +0100)
treec92410f860e9462a6749102bf4198d99be5cc28c
parentcb1bbaf244e141630f29cd117e30cc91741ac3bc
Improve feedback when completing repeated tasks from agenda view.

When marking a repeated entry DONE in the daily or weekly agenda, that
task would previously still be shown as TODO, because the repeater
immediately restores the TODO state after moving the time stamp.  This
is bad feedback.

This problem was hard to fix.  Because the same line may be present in
other lines in the same weekly agenda, we cannot simply update all
lines related to this entry.

What we do now is this:  Before the repeater does its work in shifting
the time stamp and resetting the TODO keyword, we take a snapshot of
the headline as it looks then.  And then, when we update the agenda
view, we change only the line at the cursor instead of all lines
related to this entry.  We also make sure that this is only so if the
cursor is in a daily/weekly agenda, on TODAY's date.

There still remain possible inconsistencies.  For example, if you have
a daily repeating task in the weekly agenda, and you move the cursor a
few days into the future and mark it DONE there, the entry will
actually be marked DONE for today, but still show up in today's task
list as TODO.  refreshing the agenda will fix the display in such an
unlikely case.

Thanks to Jack ??? for noticing and reporting this issue.
lisp/ChangeLog
lisp/org-agenda.el
lisp/org.el