aboutsummaryrefslogtreecommitdiffstats
path: root/oni-org/oni-org.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-01-06 10:52:05 -0800
committerGravatar Tom Willemse2021-01-06 10:52:05 -0800
commit8975e2fa22bf4741be5912041cc32f175b523be1 (patch)
tree3b50b3827f696f21f638f54cd6fdb4faefca3320 /oni-org/oni-org.el
parent5c2ed550202063791cd69749803814a6fc2ded19 (diff)
downloademacs-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).
Diffstat (limited to 'oni-org/oni-org.el')
-rw-r--r--oni-org/oni-org.el4
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