Start a new topic

Is it possible to search for entries NOT containing given tag?

 I tag some headlines with `:PROJECT:`. I'd like to have two saved searches:


- Waiting for projects:  `s WAIT t PROJECT`

- Waiting for tasks:        `s WAIT -t PROJECT`  ==> I'd like to search for everything that is not tagged as PROJECT. Is it possible?


You can't currently exclude tags using the simple search syntax. What you can do is write a query in Scheme, for example


(and (string=? (item-state item) "WAIT") (not (member "PROJECT" (item-tags item))))


I will enhance the simple search syntax in the future to allow for your use case as Scheme searches, whilst powerful, are a little verbose.


Just write the Scheme query wherever you would write a normal search.


3 people like this

The Scheme query works nicely, thank you!

Hi, is there any updates on this? This is kind of an important functionality for customizing agenda views...


I am using Orgzly as well. Just as an example, it has the all the logical operations you need to customize:

https://orgzly.com/docs#search

Currently the only way to do this is via Scheme. I'm currently playing with Orgzly on a new Android phone I've bought for development (I'm not planning on doing beorg for Android, this is for freelance app work) and intend to experiment with its search syntax and see if there are any useful ideas for improving beorgs. I do intend to look at how I can incorporate more complex searching without a user needing to resort to Scheme (which is not very user friendly to write on a soft keyboard!)

Login or Signup to post a comment