diff options
author | Tom Willemse | 2021-01-06 10:52:05 -0800 |
---|---|---|
committer | Tom Willemse | 2021-01-06 10:52:05 -0800 |
commit | 8975e2fa22bf4741be5912041cc32f175b523be1 (patch) | |
tree | 3b50b3827f696f21f638f54cd6fdb4faefca3320 | |
parent | 5c2ed550202063791cd69749803814a6fc2ded19 (diff) | |
download | emacs-config-8975e2fa22bf4741be5912041cc32f175b523be1.tar.gz emacs-config-8975e2fa22bf4741be5912041cc32f175b523be1.zip |
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).
-rw-r--r-- | oni-org/oni-org.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index d9ef258..6061667 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -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 |