emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Future repeated tasks marked done in Org Agenda don't show as


From: Ihor Radchenko
Subject: Re: [BUG] Future repeated tasks marked done in Org Agenda don't show as done [9.5 (9.5-g0a86ad @ /home/gustavo/.emacs.d/elpa/org-9.5/)]
Date: Tue, 12 Jul 2022 10:46:42 +0800

Gustavo Barros <gusbrs.2016@gmail.com> writes:

> But not to bump empty handed, I did some investigation on this, and I 
> think I know why the problem happens.

Thanks for the detailed analysis!

> What I'm not sure is why this condition is there in the first place. 
> That's the only place where the let-bound `todayp' is used in the 
> function, so I may be missing why it exists and the purpose of this 
> condition.  But one side-effect of it is that, if you happen to do a 
> repeating task ahead of schedule, you won't see the change of todo state 
> in the agenda.

I dug through the old commits and found where this behaviour has been
introduced:

Commit 0bbf3a9bd message details the current behaviour and its caveats:

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

As you can see, the todayp condition is avoiding issues with weekly
agenda when the same habit is displayed multiple times.

The problem you observed is also noted and left unresolved.

Ideas how to deal with the described are welcome!

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]