emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[feature request] org-agenda-skip-unless


From: Alexander Adolf
Subject: [feature request] org-agenda-skip-unless
Date: Mon, 28 Sep 2020 23:40:17 +0200

Hello All,

I wanted to improve a bit on my current, simple agenda setup

(setq org-agenda-custom-commands
      '(("n" "Agenda and all TODOs"
         ((agenda "" nil)
          (alltodo "" ((org-agenda-block-separator "")))))))

and achieve an agenda with three sections:
1) (agenda "" nil)
2) all todos with some planning information (scheduled or deadline)
3) all todos without any planning information

Number 1 I already have. Number 3 can be achieved with

(org-agenda-skip-function '(org-agenda-skip-if nil '(scheduled deadline)))

But what about number 2? I searched the docs and code, bout couldn't
seem to find anything.

I hence ended up with the idea that I would need a new function,
hypothetically (and cunningly) called org-agenda-skip-unless, which
would do the same as org-agenda-skip-if, but with inverted logic.

With that, my dream agenda would be:

(setq org-agenda-custom-commands
      '(("n" "Agenda and all TODOs"
         ((agenda "" nil)
          (alltodo "" ((org-agenda-block-separator "")
                       (org-agenda-overriding-header "TODO items with a date:")
                       (org-agenda-skip-function '(org-agenda-skip-unless nil 
'(scheduled deadline)))))
          (alltodo "" ((org-agenda-block-separator "")
                       (org-agenda-overriding-header "Other TODO items:")
                       (org-agenda-skip-function '(org-agenda-skip-if nil 
'(scheduled deadline)))))))))



Many thanks and looking forward to your thoughts,

  --alexander



reply via email to

[Prev in Thread] Current Thread [Next in Thread]