unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [feature request] thread-based queries
@ 2012-01-18 14:48 Patrick Totzke
  0 siblings, 0 replies; only message in thread
From: Patrick Totzke @ 2012-01-18 14:48 UTC (permalink / raw)
  To: Notmuch Mail

Hi everyone,

A recent discussion on alot's issue tracker[0]  made it clear that it might be useful to have a thread-based
matching for queries as an alternative to the current message based approach:

Consider a thread with two messages, one has a single tag 'flagged', the other a single tag 'unread'.
Now the thread doesn't match "tag:flagged AND tag:unread" as it doesn't contain any matching messages.
However, listing the tags of this thread accumulates to ['flagged', 'unread'].

As far as I know, there is no way one can tell notmuch to evaluate the query with threads as atomic entities
instead of messages so that the thread in the example above matches. I would like to see such a switch in 
libnotmuch and the python bindings, maybe as parameter to `notmuch_query_create` or as something similar to 
`notmuch_query_set_sort`.

I am aware that I can simulate the intended behaviour by rewriting the query myself, but I think
such a feature makes sense not only for alot users and should be implemented at a lower level.
Moreover, I wouldn't be surprised if doing this at a library level is less painful than higher up
as Xapian has to parse query formulae anyway and hence should offer some convenience methods for dealing with them.
Please correct me if I'm wrong here or have just overlooked previous discussions/solutions for this issue.

Best,
/p

[o]: https://github.com/pazz/alot/issues/270

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-18 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 14:48 [feature request] thread-based queries Patrick Totzke

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).