Switch to IN-PROGRESS when clocking in
When a task is TODO and I clock in, automatically switch it to IN-PROGRESS. Leave it as is if it's any other state.
This commit is contained in:
parent
53d104a44b
commit
52797d3917
1 changed files with 9 additions and 1 deletions
10
oni-org.el
10
oni-org.el
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 20190721235442
|
;; Version: 20190815163343
|
||||||
;; Package-Requires: (org-plus-contrib org-bullets hydra org-wild-notifier)
|
;; Package-Requires: (org-plus-contrib org-bullets hydra org-wild-notifier)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
(require 'hydra)
|
(require 'hydra)
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(require 'org-capture)
|
(require 'org-capture)
|
||||||
|
(require 'org-clock)
|
||||||
(require 'org-habit)
|
(require 'org-habit)
|
||||||
|
|
||||||
(defun oni-org-expand-to-home (file-name)
|
(defun oni-org-expand-to-home (file-name)
|
||||||
|
@ -98,6 +99,12 @@ After running it once remove it from `org-capture-after-finalize-hook'."
|
||||||
(setf (frame-height) 24)
|
(setf (frame-height) 24)
|
||||||
(add-hook 'org-capture-after-finalize-hook 'oni-org-delete-frame-once)))
|
(add-hook 'org-capture-after-finalize-hook 'oni-org-delete-frame-once)))
|
||||||
|
|
||||||
|
(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"
|
||||||
|
current-state))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun oni-org-open-index ()
|
(defun oni-org-open-index ()
|
||||||
"Open the index of my org-based personal wiki."
|
"Open the index of my org-based personal wiki."
|
||||||
|
@ -123,6 +130,7 @@ After running it once remove it from `org-capture-after-finalize-hook'."
|
||||||
(setq org-log-into-drawer t)
|
(setq org-log-into-drawer t)
|
||||||
(setq org-agenda-todo-ignore-scheduled 'future)
|
(setq org-agenda-todo-ignore-scheduled 'future)
|
||||||
(setq org-agenda-skip-function-global #'oni-org-skip-tasks)
|
(setq org-agenda-skip-function-global #'oni-org-skip-tasks)
|
||||||
|
(setq org-clock-in-switch-to-state #'oni-org-maybe-change-todo-state)
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
(setq org-agenda-custom-commands
|
||||||
'(("c" "Today's (Current) tasks" tags "SCHEDULED=\"<today>\"")))
|
'(("c" "Today's (Current) tasks" tags "SCHEDULED=\"<today>\"")))
|
||||||
|
|
Loading…
Reference in a new issue