Re: [PATCH] Automatically exclude tags in notmuch-show

Subject: Re: [PATCH] Automatically exclude tags in notmuch-show

Date: Sun, 22 Jan 2012 12:31:21 -0500

To: Mark Walters

Cc: notmuch@notmuchmail.org

From: Austin Clements


Quoth Mark Walters on Jan 22 at 12:38 am:
> 
> On Fri, 20 Jan 2012 12:18:01 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> > 
> > Oh dear.
> > 
> > Well, here's one idea.  Instead of doing a single thread query in
> > show, do a thread query without the exclusions and then a message
> > query with the exclusions.  Output all of the messages from the first
> > query, but use the results of the second query to determine which
> > messages are "matched".  The same could be accomplished in the library
> > somewhat more efficiently, but it's not obvious to me what the API
> > would be.
> 
> I have been thinking about this and one question is what should the sort
> order be? If I understand it correctly notmuch sorts the threads
> by the oldest/newest matching message, so the "correct" behaviour if no
> message matches is unclear. Perhaps all threads with a matching
> non-excluded message sorted by the matching-non-excluded message
> followed by all threads that match only on excluded messages with sort
> based on the matching excluded message?

I don't think show sorts in any particular way.  Or are you saying
that search also needs to know the difference between excluded and
non-excluded matched messages?

Thread: