Title is pretty self explanatory. I have implemented the below solution to 'clock in' when I change my org-todo state to IN-PROGRESS and 'clock out' when I leave that state.
(add-hook 'org-after-todo-state-change-hook 'org-clock-todo-change) (defun org-clock-todo-change () (if (string= org-state "IN-PROGRESS") (org-clock-in) (org-clock-out)))
The problem is that when I make this change, my repeating tasks stop working correctly. e.g., if I have a repeating task
*** TODO Take vitamins SCHEDULED: <2022-03-31 Thu .+1d>
And mark it 'DONE', I would expect to see the behavior described here, so something like
*** TODO Take vitamins SCHEDULED: <2022-04-01 Fri .+1d>
But instead I see
*** DONE Take vitamins CLOSED: [2022-03-30 Wed 18:50] SCHEDULED: <2022-03-31 Thu .+1d>
Thanks for your help.