[PATCH] emacs: call "notmuch tag" only once when archiving a thread

Austin Clements amdragon at MIT.EDU
Sun Jan 8 17:12:59 PST 2012


Quoth Aaron Ecay on Jan 08 at  7:56 pm:
> On Thu, 05 Jan 2012 22:32:16 +0200, Jani Nikula <jani at nikula.org> wrote:
> 
> [...]
> 
> > In the show view it only modifies the messages that are currently
> > visible. This is to make sure you don't accidentally archive things that
> > have arrived after refreshing the buffer. I think this is safest.
> 
> Hmm.  Perhaps it would make sense to add a check in the search view that
> the thread being archived[1] has the same number of messages as it did
> when the buffer was constructed.  (The information on how many messages
> the thread has is in the buffer; we would then compare this to the result
> of “notmuch count thread:000foo” when the user requests to archive.)  If
> the counts don’t match, the interface should show a message in the echo
> area and (probably) refuse to do the tagging.

That sounds like a clever workaround.

There's been quite a bit of discussion on fixing this properly.  See,
for example
id:"CAH-f9WsPj=1Eu=g3sOePJgCTBFs6HrLdLq18xMEnJ8aZ00yCEg at mail.gmail.com".
The gist is that we need to include message IDs (or document IDs) in
the search output and use these in tagging operations, rather than the
unstable thread:XXX queries.  Unfortunately, actually fixing this got
stalled since adding this information the text format is a fool's
errand (having been the fool, I can say this!), so we need to switch
Emacs over to using the JSON search format first.  However, once
that's done, it's a relatively simple change.


More information about the notmuch mailing list