From b454114819f8fb2529b4fd6c3373bb35e707a9a6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 28 Feb 2022 09:39:42 -0600 Subject: Add org-taskwise --- init.el | 7 +++++++ lisp/+org.el | 21 --------------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/init.el b/init.el index e5dcbb4..247f241 100644 --- a/init.el +++ b/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") diff --git a/lisp/+org.el b/lisp/+org.el index 7b4ac4a..d23d778c 100644 --- a/lisp/+org.el +++ b/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 -- cgit 1.4.1-21-gabe81