From 8975e2fa22bf4741be5912041cc32f175b523be1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 6 Jan 2021 10:52:05 -0800 Subject: [PATCH] When clocking in, check for a state head and switch to the next MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- oni-org/oni-org.el | 4 ++-- 1 file 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