[PATCH] emacs: call "notmuch tag" only once when archiving a thread
aaronecay at gmail.com
Sun Jan 8 16:56:01 PST 2012
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 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.
We could also optionally use this strategy in the search view too. The
error message is simple there: “New messages have arrived; refresh
thread view before archiving.” (It doesn’t make as much sense to tell
people to refresh a search view – it could be an expensive operation
and/or may not be idempotent if some thread’s tags have been changed.
So it’s harder to say what the advice should be in that case.)
If other people think it would be useful, I can work on a patch to
implement this approach.
 Or having its tags changed generally.
More information about the notmuch