Add org-taskwise
This commit is contained in:
parent
1ecd585824
commit
b454114819
7
init.el
7
init.el
|
@ -1798,6 +1798,13 @@ See also `crux-reopen-as-root-mode'."
|
|||
;; (:hook-into org-mode)
|
||||
)
|
||||
|
||||
(setup (:straight (org-taskwise
|
||||
:host github
|
||||
:repo "duckwork/org-taskwise.el"))
|
||||
(:load-after org)
|
||||
(:bind-into org-mode
|
||||
"C-x n t" #'org-taskwise-narrow-to-task))
|
||||
|
||||
(setup (:straight org-visibility)
|
||||
(:require org-visibility)
|
||||
(:option org-visibility-state-file (.etc "org-visibility")
|
||||
|
|
21
lisp/+org.el
21
lisp/+org.el
|
@ -570,26 +570,5 @@ and POST-PROCESS are passed to `org-export-to-file'."
|
|||
;;; Taskwise functions
|
||||
;; TODO: break out into another library
|
||||
|
||||
(defun +org-upto-task ()
|
||||
"Go to the heading of the current task."
|
||||
(interactive)
|
||||
(while (not (org-get-todo-state))
|
||||
(org-up-heading-or-point-min)))
|
||||
|
||||
(defun +org-narrow-to-task ()
|
||||
"Narrow the buffer to current task."
|
||||
(interactive)
|
||||
(+org-upto-task)
|
||||
(org-narrow-to-subtree))
|
||||
|
||||
(defun +org-task-clock-in (&optional select start-time)
|
||||
"Start the clock on the current task.
|
||||
SELECT and START-TIME, if provided, are passed on to
|
||||
`org-clock-in'."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(+org-upto-task)
|
||||
(call-interactively #'org-clock-in)))
|
||||
|
||||
(provide '+org)
|
||||
;;; +org.el ends here
|
||||
|
|
Loading…
Reference in New Issue