Skip to main content
3 of 3
edited body
NickD
  • 33.6k
  • 3
  • 30
  • 47

Show one todo tree with two different states

Hi I would like to make this function show a tree with headings in NEXT and WAITING status.

    (defun show-NEXT-in-subtree ()
       "Narrow to a subtree and show only headings with NEXT and WAITING keywords"
       (interactive)
       (org-narrow-to-subtree)
       (org-show-todo-tree '(3 4)) ;; NEXT|WAITING
       (org-ctrl-c-ctrl-c))

I don't understand how to do it in the correct way according to help.

With a prefix argument (or by using C-c / T), search for a specific TODO. You will be prompted for the keyword, and you can also give a list of keywords like KWD1|KWD2|... to list entries that match any one of these keywords. With a numeric prefix argument N, show the tree for the Nth keyword in the option org-todo-keywords.