org-agenda repeat task 无法 repeat

(setq     org-todo-keywords
     (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
             (sequence "PROJECT(p)" "|" "DONE(d!/!)" "CANCELLED(c/!)")
             (sequence "WAITING(w/!)" "DELEGATED(e!)" "HOLD(h)" "|" "CANCELLED(c/!)")))
     org-todo-repeat-to-state "NEXT")

关键字的设置如上

NEXT Agenda cleaning
SCHEDULED: <2024-05-01 Wed +1m>
:PROPERTIES:
:LAST_REPEAT: [2024-04-07 Sun 11:47]
:ACTIVATED: [2022-08-01]
:END:

按照正常的操作逻辑 C-c C-t d 应该是自动又变为 NEXT 了时间推后一个月。这两个月突然失灵了,C-c C-t c 变为 CANCELLED 反而是可以 repeat 的。相关配置从有效到失灵没有改动。 不知道是否有具体排查的方法,或者有人遇到过类似的问题。

I just tried emacs -Q -l /tmp/bug.el /tmp/bug.org with your provided configuration code and the Org heading. Changing the todo state to DONE or CANCELLED automatically re-schedules the scheduled date and changes the todo keyword back to NEXT. Everything looks normal.


我刚刚尝试了使用您提供的配置代码和Org标题来运行emacs -Q -l /tmp/bug.el /tmp/bug.org。将待办状态更改为已完成或取消会自动重新安排计划日期,并将待办关键字更改回下一个。一切看起来正常。

是 org-clock 里面有个函数用于 DONE 的时候结束计时有点问题。感谢

(defun +done-with-auto-clock-out()
  (when (string= org-state "DONE")
    (org-clock-out)))

May you elaborate? You quote a function, but it is not clear where it is from (Doom?), how it is used, and what the exact problem is.


可以详细说明吗?您引用了一个函数,但不清楚它来自哪里(Doom?),如何使用以及确切的问题是什么。

repeat task 的原理是先完结,然后再次回到 TODO 的状态,完成一次重复。参考 org mode - Org repeated task doesn't repeat when DONE - Emacs Stack Exchange

我添加了一个 hook 在 TODO 完结状态为 DONE 的时候自动结束 clock 的计时,应该是这个自动结束 clock 计时的函数有问题打断了再次回到 TODO 状态的这个重复。