emacs-orgmode
[Top][All Lists]
Advanced

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

Bug: Duplicated TODO state change logging with `!' per-keyword markers a


From: Leon Vack
Subject: Bug: Duplicated TODO state change logging with `!' per-keyword markers and repeater [9.4.6]
Date: Thu, 03 Jun 2021 20:35:19 +0200

Hello,

Starting with version 9.4.6, state logging through a per-keyword marker
`!' produces duplicate log entries on tasks with a repeater.

A minimal test configuration to reproduce the issue is:

(setq org-todo-keywords '((sequence "TODO" "DONE(!)")))

Then, creating a task with a repeater:

* TODO Test Task
SCHEDULED: <2021-06-04 Fri .+1d>

And marking it done yields:

* TODO Test Task
SCHEDULED: <2021-06-04 Fri .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-06-03 Thu 19:58]
:END:
- State "DONE"       from "TODO"       [2021-06-03 Thu 19:58]
- State "DONE"       from "TODO"       [2021-06-03 Thu 19:58]

Instead of:

* TODO Test Task
SCHEDULED: <2021-06-04 Fri .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-06-03 Thu 19:58]
:END:
- State "DONE"       from "TODO"       [2021-06-03 Thu 19:58]

I have done some debugging and testing. The first commit in which I was
able to reproduce the bug is c670379adfbdc4883d3cfa230289fd2829993265.
This commit changed the behavior of `org-add-log-setup' to call
`org-add-log-note' directly (instead of just adding it to the
`post-command-hook') when logging only a timestamp and no note. The
problem is, that with a repeater when enabling logging through a `!'
marker, `org-add-log-setup' is called twice: Once by `org-todo' directly
and once by `org-auto-repeat-maybe' resulting in the two state log
entries.

Emacs: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, 
cairo version 1.16.0)

Leon Vack



reply via email to

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