I want to find all todo's except type TASK without having to list all the other types.

I tried the following but no luck:

(setq org-agenda-custom-commands '( ("h" "Everything not a task"
 ( (todo "-TASK")))))

Gives an empty list.

(setq org-agenda-custom-commands '( ("h" "Everything not a task"
 ( (todo ".*|-TASK")))))

Gives me everything, also TASK

(setq org-agenda-custom-commands '( ("h" "Everything not a task"
 ( (todo "TODO|-TASK")))))

Gives me all TODO, and not TASK but I don't want to also maintain the list of types here.


This should return all todo's except those with a today keyword of TASK

(setq org-agenda-custom-commands '( ("h" "Everything not a task"
                                     ( (tags-todo "+TODO<>\"TASK\"")))))

you could also use

(setq org-agenda-custom-commands '( ("h" "Everything not a task"
                                     ( (tags-todo "/-TASK")))))

This is based on the documentation here.

  • Would that also include my INPROGEsS todos? Mar 3 '17 at 19:44
  • Trying to grok that syntax while I'm still on mobile. Mar 3 '17 at 19:47
  • Maybe I misunderstood, is TASK a tag or a TODO keyword that you're trying to avoid? This will pull all TODO's except those that are a TODO keyword of TASK
    – kfoley
    Mar 3 '17 at 20:03
  • It's basically just +TODO<>"TASK" , see "Limit tags and properties searches by TODO state" on orgmode.org/worg/org-tutorials/advanced-searching.html
    – kfoley
    Mar 3 '17 at 20:04
  • it is a TODO Keyword. now at laptop and I can see it works - so thats great :) I now just wonder what the meaning of +/- syntax is that is described in org-mode manual. I haven't seen the <> before, but seems good ;) Mar 3 '17 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.