emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Gustavo Barros <gusbrs.2016@gmail.com>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87a69f6oa5.fsf@localhost> (raw)
In-Reply-To: <87tu7n68xs.fsf@gmail.com>

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

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!


  reply	other threads:[~2022-07-12  2:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 13:05 [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/)] Gustavo Barros
2021-10-29 13:40 ` Ihor Radchenko
2021-10-29 13:45   ` Gustavo Barros
2022-07-11 13:51   ` Gustavo Barros
2022-07-12  2:46     ` Ihor Radchenko [this message]
2022-07-12 11:20       ` Gustavo Barros
2022-07-18  6:28         ` Ihor Radchenko
2022-07-18 10:30           ` Gustavo Barros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a69f6oa5.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gusbrs.2016@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).