I have the following to report:

*ACTUAL CONFIGURATION:*

   - Emacs 29.4
   - org-mode version 9.7.5
   - I have org-todo-keywords set to '((sequence "TODO(t)" "WAITING(w@/!)"
   "|" "DONE(d/!)"))
   - I have org-log-done set to 'note
   - I have org-log-into-drawer set to t

*ACTUAL BEHAVIOUR:*

If I go from *TODO* state directly to *DONE* state, the *CLOSED* timestamp
will get recorded, and I do get prompted for a *CLOSING NOTE*.

When I set a *TODO* item to *WAITING*, and from there to *DONE*, the
*CLOSED* property gets set correctly, but I don't get prompted to
record a *CLOSING
NOTE*. Instead the exit state change from *WAITING* will get recorded, and
my log drawer will look like this:

1234:LOGBOOK:
- State "WAITING"    from "TODO"       [2025-09-22 Mon 13:43]
- State "DONE"       from "WAITING"    [2025-09-22 Mon 16:53]
:END:

Even changing the *DONE* state from "DONE/!" to "DONE(@/!)" doesn't affect
that.

*EXPECTED BEHAVIOUR:*

Please note, that I have set the todo keywords such that *WAITING* and
*DONE* states log the state change in case they revert back to *TODO* state
for any reason, or if *DONE* state reverts back to *WAITING*.

OTOH, if *TODO* state changes to either *WAITING* or *DONE*, we should be
prompted for a note. Specifically, in case of changing to *DONE* state, it
should be a *CLOSING NOTE* (because org-log-done is set to 'note).

This means that recording the *CLOSING NOTE* must always take precedence
over the state exit note from the *WAITING* state. IMHO, the fact that
there is a separate org-log-done option with a 'note value does imply
exactly that.

-- 
Best regards,
Daniel Dinnyes

Reply via email to