I think I have solved this, though I am not really sure why the solution
works. As noted previously, my org-todo-keywords are defined as follows:
(setq org-todo-keywords
'((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "WAITING(w@/!)"
"|" "DONE(x!)" "DELEGATED(d@)")
(sequence "DEFERRED(f@/!)" "INACTIVE(i@/!)" "|" "CANCELED(c@)")))
By trial-and-error with a minimal init.el file, I discovered that
removing the exclamation point from the DONE fast access key solved the
problem, at least in the testing I have done so far (with both the
minimal init.el and my full configuration). That is to say, the new
setting is as follows:
(setq org-todo-keywords
'((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "WAITING(w@/!)"
"|" "DONE(x)" "DELEGATED(d@)")
(sequence "DEFERRED(f@/!)" "INACTIVE(i@/!)" "|" "CANCELED(c@)")))
I have not touched this variable in many years, and as far as I can tell
the documentation on the use of "!" is the same as it has been since the
day I started using org. Even without the "!", the time I completed the
task still gets logged in the LOGBOOK, but now only once instead of
being duplicated.
I also have this in my init.el:
(setq org-log-done 'time)
Could this be conflicting with "DONE(x!)" in org-todo-keywords?
Best regards,
Alan
On 7/7/21 11:50 AM, Alan Ristow wrote:
I recently updated org from 9.3 (release_9.3) to 9.4.6 (9.4.6-gfdb98a)
and observed several changes in behavior when marking recurring tasks
as DONE. I have not found reports of anything similar via Google or
the mailing list archives, so rather than a bug it might be a package
conflict or a configuration issue; in any case, I am having a really
tough time figuring it out and I hope somebody here might be able to
give me some pointers.
I use straight.el for package management and as part of this update I
had to switch from using org-plus-contrib to using org-contrib.
Normally, straight.el would make it easy for me to go back to my old
configuration -- I have the lockfile with all the package versions --
but because of the movement in org repos and the change from
org-plus-contrib to org-contrib, I am running into difficulty doing
that, which probably contributes to my difficulties in troubleshooting.
EXPECTED (FORMER) BEHAVIOR
Suppose I have a task that looks like this:
** TODO Daily review
SCHEDULED: <2021-07-07 Wed .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-07-06 Tue 10:03]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2021-07-06 Tue 10:03]
:END:
I then do the following:
1. Move the cursor to the TODO line and mark it DONE (t-x in agenda
view, C-t x in the file buffer).
2. The scheduled date is updated to the next recurrence, and the
current time is recorded in the LAST_MODIFIED property drawer and in
the LOGBOOK.
After, the task looks like this:
** TODO Daily review
SCHEDULED: <2021-07-08 Thu .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-07-07 Wed 11:18]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2021-07-07 Wed 11:18]
- State "DONE" from "TODO" [2021-07-06 Tue 10:03]
:END:
I get the same result when the task is marked as a habit and also when
I bulk-process tasks from the agenda view using org-agenda-bulk-action.
ACTUAL (CURRENT) BEHAVIOR
I have observed two changes in behavior since updating to org 9.4.6
and org-contrib.
First, if I do exactly the same as above, the time of completion is
logged twice:
** TODO Daily review
SCHEDULED: <2021-07-08 Thu .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-07-07 Wed 11:18]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2021-07-07 Wed 11:18]
- State "DONE" from "TODO" [2021-07-07 Wed 11:18]
- State "DONE" from "TODO" [2021-07-06 Tue 10:03]
:END:
Second, if I bulk-process a habit via org-agenda-bulk-action, the task
is simply marked DONE. Bot the recurrence and the LAST_REPEAT field
are ignored, but the time stamp is only entered into the LOGBOOK once:
** DONE Walk
CLOSED: [2021-07-07 Wed 11:26] SCHEDULED: <2021-07-07 Wed .+1d>
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2021-07-06 Tue 15:33]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2021-07-07 Wed 11:26]
- State "DONE" from "TODO" [2021-07-06 Tue 15:33]
:END:
MY CONFIGURATION
The extensions to org that I load are: org-super-agenda,
org-superstar, org-capture, org-tempo, org-checklist, org-habit,
helm-org-rifle, org-drill, ox-pandoc, org-make-toc, org-ql, org-roam,
org-journal, org-ref, org-ref-helm-bibtex, and org-roam-bibtex. All
are the latest versions accessible to straight.el.
My init.el includes the following:
(setq org-log-done 'time
org-log-redeadline 'time
org-log-reschedule 'time
org-log-into-drawer t
org-log-state-notes-insert-after-drawers nil)
(setq org-todo-keywords
'((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "WAITING(w@/!)"
"|" "DONE(x!)" "DELEGATED(d@)")
(sequence "DEFERRED(f@/!)" "INACTIVE(i@/!)" "|"
"CANCELED(c@)")))
Best regards,
Alan