1
0
Fork 0

When clocking in, check for a state head and switch to the next

Instead of checking specifically that it’s in the TODO state, check that it’s in
any one of the first states (like TODO, or READ). If this is the case, switch it
from the current state to whatever the settings define as being the next
state (usually WIP or READING).
This commit is contained in:
Tom Willemse 2021-01-06 10:52:05 -08:00
parent 5c2ed55020
commit 8975e2fa22

View file

@ -79,8 +79,8 @@ installs it will always be ~."
(defun oni-org-maybe-change-todo-state (current-state)
"Change the state of the current task to in-progress CURRENT-STATE is todo."
(if (string= current-state "TODO")
"IN-PROGRESS"
(if (member current-state org-todo-heads)
(cadr (member current-state org-todo-keywords-1))
current-state))
;;;###autoload