diff --git a/configuration.org b/configuration.org index 1b95cd1..bac6173 100644 --- a/configuration.org +++ b/configuration.org @@ -975,6 +975,17 @@ PRIORITY may be one of the characters ?A, ?B, or ?C." nil))) #+END_SRC +** Filter out entries from the Org agenda with a specific state + +#+BEGIN_SRC emacs-lisp +(defun gpolonkai/org-skip-subtree-if-state (state) + "Skip an agenda entry if its state is STATE." + (let ((subtree-end (save-excursion (org-end-of-subtree t)))) + (if (string= (org-get-todo-state) state) + subtree-end + nil))) +#+END_SRC + ** Wrapper around ~org-agenda~ to open my own custom list #+BEGIN_SRC emacs-lisp @@ -2516,6 +2527,7 @@ This is a big one; I use a lot of customisation here. ((org-agenda-skip-function '(or (air-org-skip-subtree-if-habit) (air-org-skip-subtree-if-priority ?A) + (gpolonkai/org-skip-subtree-if-state "SOMEDAY") (org-agenda-skip-if nil '(scheduled deadline)))) (org-agenda-overriding-header "ALL normal priority tasks")))) ((org-agenda-compact-blocks t)))))