3

I would like to use agenda to generate a list of currently active projects. An active project (for me) is an entry tagged with wip and is not a TODO entry. I would like the list to have only the top-most entry, ignoring all children. Thus, once the search has hit a match, it can skip searching all children.

I am having difficulty because because tags are inherited by children, and therefore, children show up in my search --- how do I prevent this? For example, doing a match in agenda using wip+TODO="" strips out the TODO items (that's good) but parents and all children inheriting the wip tag show up.

Note: the top-most entry is not necessarily at LEVEL 1 or 2. The top-most entry with a wip tag could be deeper in the outline structure. I am using agenda because I need to search across several org files; otherwise, within a single org file, I would just create a sparse-tree.

1 Answer 1

2

I think I arrived at a solution. It seems to work from initial testing.

(setq org-tags-match-list-sublevels nil)

Then do M-x org-tags-view and use search string wip+TODO=""

I found the key insight from @lawlist who responded to a different question here.

I will probably write a function to do this so that I change the value of org-tags-match-list-sublevels only when I need to execute this specific search.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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