After org-clock-out the current todos, I have to manually change its status from todo to done.
How could automate the process.
If a clocking task was clocked-out, it's status would be changed to done automatically.
After org-clock-out the current todos, I have to manually change its status from todo to done.
How could automate the process.
If a clocking task was clocked-out, it's status would be changed to done automatically.
Customize org-clock-out-switch-to-state variable:
Set task to a special todo state after clocking out. The value should be the state to which the entry should be switched. If the value is a function, it must take one parameter (the current TODO state of the item) and return the state to switch it to.
Also you can run org-clock-out with a universal prefix:
With a universal prefix, prompt for a state to switch the clocked out task to, overriding the existing value of
org-clock-out-switch-to-state.
I've found that sometimes I wanted to change the TODO status to something different to DONE and I've created a tiny hook to choose the state on clocking out:
;; Adjust TODO after clocking out (add-hook 'org-clock-out-hook (lambda () (org-todo (upcase (completing-read "Is the task done, todo, inreview or wont_do: " '("done" "todo" "inreview" "wont_do")))))) As you might see, my statuses are TODO, DONE, INREVIEW and WONTDO (and also INPROGRESS, but it doesn't make sense after clocking out)
The hook triggers on clocking out and ask the user (with autocompletion) to choose among the possible TODO states. To make things easy I change to uppercase so I don't need to press shift and the letters of the states)
I hope it helps