Search by excluding tags

“not” searches can be tricky to get right in TaskPaper because the ancestors of search result are always included along with the search results. A little better explanation is in this post:

I expect what’s happening is that you have something like this:

hello world @drop
    child of hello world

And when you search for not @drop you see the two above items in the results. The reason is that “child of hello world” is matching not @drop … and then “hello world @drop” is inserted into the results since it’s an ancestor.

You can work around this using except. For example here’s the official not @done search:

not @done except @done//*

It first finds all items that are not @done. It then removes from those results the descendants from all items that ARE @done. I think you can use this same pattern to get the results you want.