diff options
author | fpi | 2020-07-29 11:34:51 +0200 |
---|---|---|
committer | fpi | 2022-03-17 14:44:35 +0100 |
commit | e37bd5af68b9fc4ab60dae924c90f74ff81640d1 (patch) | |
tree | 0af04c9efea3881089a0afb91a78edc7ae4ca772 | |
parent | Add general project functions & agendas by jwiegley (diff) |
Include tasks of subprojects in current hotlist
Diffstat (limited to '')
-rw-r--r-- | emacs-init.org | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/emacs-init.org b/emacs-init.org index 5d73324..ce6b6a6 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -3642,13 +3642,14 @@ Simple day agenda with =INPROGRESS= tasks #+begin_src emacs-lisp :tangle no :noweb-ref org-agenda-custom-commands ("h" "Current Hotlist" tags "TODO={NEXT\\|INPROGRESS\\|WAITING}" ((org-agenda-overriding-header "Current Hotlist") - (org-agenda-skip-function - (function fpi/org-agenda-skip-all-not-hot)))) + (org-agenda-skip-function (function fpi/org-agenda-skip-all-not-hot)) + ;; (org-agenda-prefix-format " %-3i %-12:c%30b %s") + )) #+end_src #+begin_src emacs-lisp :tangle no :noweb-ref org-agenda-config (defun fpi/org-agenda-skip-all-not-hot () "Skip all not hot entries." - (when (not (member "HOT" (my-org-current-tags 1))) + (when (not (member "HOT" (my-org-current-tags (fpi/org-project-depth 10)))) (or (outline-next-heading) (goto-char (point-max))))) (defun fpi/org-agenda-skip-all-not-project () @@ -3668,6 +3669,14 @@ Simple day agenda with =INPROGRESS= tasks (if (looking-at "^\*+\\s-+") (setq should-skip (org-get-local-tags)))) should-skip)))) +(defun fpi/org-project-depth (depth) + "Return number of subheadings before reaching top project." + (let ((current (org-current-level)) + (top (save-excursion + (fpi/org-goto-top-project depth) + (org-current-level)))) + (- current top) + )) (defun fpi/org-goto-top-project (depth) "Go to the top project of heading under point" (save-restriction |