1
0
Fork 0

[oni-org] Don't change the state of a TODO when I'm capturing it

When a capture template is set up to clock in as I'm capturing it, this function
would immediately change the state of the item to WIP (or whichever next status
there was), but even though I'm spending time on the ticket at that point it's
not in progress yet.
This commit is contained in:
Tom Willemse 2022-01-11 10:02:29 -08:00
parent 011f0ce2f9
commit 7df353e7dc

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2022.0110.220554
;; Version: 2022.0111.100221
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti mixed-pitch)
;; This program is free software; you can redistribute it and/or modify
@ -235,7 +235,8 @@ located at the start of the line."
(defun oni-org-maybe-change-todo-state (current-state)
"Change the state of the current task to in-progress CURRENT-STATE is todo."
(if (member current-state org-todo-heads)
(if (and (not org-capture-mode)
(member current-state org-todo-heads))
(cadr (member current-state org-todo-keywords-1))
current-state))