Exclusions in searches


#1

Hi all -

I’m new here. I’ve been loving TaskPaper and finding these forums invaluable in getting started and customizing it to suit me.

One thing I’m stuck on is excluding projects and tags from search results. I’ve read a few form topics on this, including:



However, maybe I’m being a bit thick, but I’m not getting the result I want.

I’m trying to create a Next 7 Days search that includes @today, @due, and @start, and excludes @done, @waiting, and the Archive: project.

This is my current version. It still shows tasks in the Archive project.
@today union @due <[d] Tomorrow + 7d union @start <[d] tomorrow + 7d except /Archive//*

For example, a task that still shows in Archive after this search is:
@waiting on @bob and @brian to respond to @chuck re question @due(2018-07-17) @done(2018-07-16) @project(MyProject / Clear up that issue)

I also tried adding “except @waiting//*”, to the search (based on what I see in the default not done search, but it doesn’t seem to do anything. So, I had the following - maybe you can’t chain except clauses like that?
@today union @due <[d] Tomorrow + 7d union @start <[d] tomorrow + 7d except /Archive//* except @waiting//*

Thanks to anyone who can shed some light on this for me!

Cheers,

David


#2

Try this. I just added parentheses to make sure that except /Archive//* is evaluated last:

(@today union @due <[d] Tomorrow + 7d union @start <[d] tomorrow + 7d) except /Archive//*

#3

Yup. For some reason I think I tried and failed using parentheses.

Here’s what I have now that seems to be working:
((@today union @due <[d] Tomorrow + 24h union @start <[d] tomorrow + 24h) except //@waiting) except /Archive//*

Thanks for the help!