Add org-taskwise

This commit is contained in:
Case Duckworth 2022-02-28 09:39:42 -06:00
parent 1ecd585824
commit b454114819
2 changed files with 7 additions and 21 deletions

View File

@ -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")

View File

@ -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