diff options
| -rw-r--r-- | oni-org/oni-org.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index f505814..d2df96b 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2025.0306.003512 +;; Version: 2026.0105.140349 ;; Package-Requires: (oni-yasnippet oni-hydra org org-edna diminish olivetti org-pretty-table) ;; This program is free software; you can redistribute it and/or modify @@ -158,13 +158,20 @@ located at the start of the line." (add-to-list 'yas-snippet-dirs oni-org-snippets-dir t)) (yas-load-directory oni-org-snippets-dir)) -(defun oni-org-maybe-change-todo-state (current-state) +(defun oni-org-maybe-change-to-wip-state (current-state) "Change the state of the current task to in-progress CURRENT-STATE is todo." (if (and (not org-capture-mode) (member current-state org-todo-heads)) (cadr (member current-state org-todo-keywords-1)) current-state)) +(defun oni-org-maybe-change-to-todo-state (current-state) + "Change the state of the current task to in-progress CURRENT-STATE is wip." + (if (and (not org-capture-mode) + (equal current-state (cadr org-todo-keywords-1))) + (car org-todo-keywords-1) + current-state)) + ;;;###autoload (defun oni-org-open-index () "Open the index of my org-based personal wiki." @@ -278,7 +285,8 @@ _di_: Add inlineimages STARTUP ;; ever used because there are code blocks in there. (setq org-archive-location (format-time-string "%%s_archive_%Y::")) (setq org-fold-catch-invisible-edits 'error) -(setq org-clock-in-switch-to-state #'oni-org-maybe-change-todo-state) +(setq org-clock-in-switch-to-state #'oni-org-maybe-change-to-wip-state) +(setq org-clock-out-switch-to-state #'oni-org-maybe-change-to-todo-state) (setq org-extend-today-until 2) (setq org-fontify-whole-heading-line t) (setq org-fontify-quote-and-verse-blocks t) |
