Filter out SOMEDAY items from the agenda

These are things that i may or may not do.
This commit is contained in:
Gergely Polonkai 2018-11-19 14:33:24 +01:00
parent 58da43d685
commit dd356caee6
1 changed files with 12 additions and 0 deletions

View File

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