added toplevel override

This commit is contained in:
petrucci4prez 2018-06-27 21:12:46 -04:00
parent 5b0557d8fc
commit bcf210fdfa
1 changed files with 3 additions and 3 deletions

View File

@ -1196,12 +1196,13 @@ Projects are handled quite simply. They have statuscodes
for which I test, and this can all be handled by one function. for which I test, and this can all be handled by one function.
Note that this is used for "normal" projects as well as iterators Note that this is used for "normal" projects as well as iterators
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun nd/skip-non-projects () (defun nd/skip-non-projects (&optional ignore-toplevel)
(save-restriction (save-restriction
(widen) (widen)
(let ((keyword (nd/is-project-p))) (let ((keyword (nd/is-project-p)))
(if keyword (if keyword
(if (and nd/agenda-limit-project-toplevel (if (and nd/agenda-limit-project-toplevel
(not ignore-toplevel)
(nd/heading-has-parent 'nd/is-todoitem-p)) (nd/heading-has-parent 'nd/is-todoitem-p))
(nd/skip-subtree)) (nd/skip-subtree))
(nd/skip-heading))))) (nd/skip-heading)))))
@ -1448,8 +1449,7 @@ set as a text property for further sorting"
(tags-todo (tags-todo
,(concat actionable "-" periodical "-" iterator) ,(concat actionable "-" periodical "-" iterator)
((org-agenda-overriding-header ((org-agenda-overriding-header
(concat (and (concat (and nd/agenda-limit-project-toplevel "Toplevel ")
nd/agenda-limit-project-toplevel "Toplevel ")
"Archivable Projects")) "Archivable Projects"))
(org-agenda-skip-function '(nd/skip-non-projects)) (org-agenda-skip-function '(nd/skip-non-projects))
(org-agenda-before-sorting-filter-function (org-agenda-before-sorting-filter-function