[PATCH 00/11] Fix search tagging races

Mark Walters markwalters1009 at gmail.com
Wed Oct 9 00:43:20 PDT 2013


On Mon, 07 Oct 2013, Austin Clements <amdragon at MIT.EDU> wrote:
> I was hacking on undo support for notmuch-emacs and sort of
> accidentally wrote this instead.  This series fixes a set of
> well-known races where tagging from search-mode unexpectedly affects
> messages that arrived after the search was performed (and hence the
> user doesn't know they're tagging them).  We've attacked this a few
> times before, but have always run up against something that was
> missing.  It turns out the pieces are finally all in place.
>
> The first five patches just clean various things up in preparation.
> Patches 6 and 7 add support for tagging large queries, which would
> otherwise become a problem when later patches start using explicit
> message ID-based queries for tagging.  The remaining four patches
> actually fix the search tagging races using explicit message ID-based
> queries.
>
> It's a fairly long series, but none of the patches are very big.

One more thought on this: what should "*+tag" do if the search buffer is
still filling?

As it stands this is a substantial change: previously you could
look at the first few threads to make sure the query was doing what you
expected and then tag all the matching threads. Now you would have to
wait for the buffer to fill and there is not even a clear indication to
the user of when that happens (except scroll to the bottom and see if it
says "End of search results.")

Best wishes

Mark


More information about the notmuch mailing list