[PATCH 4/7] lib: Add the exclude flag to notmuch_query_search_threads

Austin Clements amdragon at MIT.EDU
Mon Jan 30 21:07:48 PST 2012


Quoth Mark Walters on Jan 29 at  6:39 pm:
> Add the NOTMUCH_MESSAGE_FLAG_EXCLUDED flag to
> notmuch_query_search_threads. Implemented by inspecting the tags
> directly in _notmuch_thread_create/_thread_add_message rather than as
> a Xapian query for speed reasons.

Hmm.  Won't the thread sort be influenced by excluded messages?

It's not completely obvious to me if it should or shouldn't be.  If
excluded messages are counted for thread sorting, it would be very
natural to toggle their visibility in the search view; otherwise we
probably need to perform the entire query again with exclusions
disabled.

If we do want to ignore excluded messages for sorting, I think
notmuch_query_search_threads can simply shuffle excluded messages to
the end of doc_ids (which is slightly awkward to implement, but not
too bad).


More information about the notmuch mailing list