emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gustavo Barros <gusbrs.2016@gmail.com>
To: 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: Mon, 11 Jul 2022 10:51:55 -0300	[thread overview]
Message-ID: <87tu7n68xs.fsf@gmail.com> (raw)
In-Reply-To: <87k0hwdk54.fsf@localhost>

Hi All,

On Fri, 29 Oct 2021 at 21:40, Ihor Radchenko <yantar92@gmail.com> wrote:

> Gustavo Barros <gusbrs.2016@gmail.com> writes:
>
>> The glitch is that some repeated tasks, when marked done in the 
>> Agenda, 
>> show no visual feedback that the action has taken place, as usual, 
>> and 
>> if you refresh the Agenda, they just vanish, which demonstrates the 
>> action had indeed taken place in the agenda file, just not shown in 
>> the 
>> Agenda buffer itself.  And, as far as I can tell, this happens to 
>> repeated tasks, scheduled in future.  For tasks scheduled for today 
>> or 
>> in the past, they appear to be done as expected.
>
> Confirmed
>
> Best,
> Ihor

This is a respectful bump on this one.

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

At `org-agenda-todo' when a task is a repeating one, the value of 
`org-agenda-headline-snapshot-before-repeat' stored at `org-todo' may or 
may not replace `newhead' depending on some conditions, which are:

#+begin_src emacs-lisp
(when (and org-agenda-headline-snapshot-before-repeat
	   (not (equal org-agenda-headline-snapshot-before-repeat
		       newhead))
	   todayp)
  (setq newhead org-agenda-headline-snapshot-before-repeat
	just-one t))
#+end_src

So that `newhead' is set to `org-agenda-headline-snapshot-before-repeat' 
only if `todayp' is non-nil.  And, indeed, this seems to be the 
condition which results in the missing visual feedback reported here. 
I've tried without it, and it works.  (I'm currently using built-in 
9.5.2, but I think there's no change in the function to current release 
9.5.4 and also, light testing with the latter suggests no change in the 
reported issue).

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.

Best regards,
Gustavo.


  parent reply	other threads:[~2022-07-11 15:11 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 [this message]
2022-07-12  2:46     ` Ihor Radchenko
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87tu7n68xs.fsf@gmail.com \
    --to=gusbrs.2016@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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

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