emacs: Fix search tagging races
authorAustin Clements <amdragon@MIT.EDU>
Thu, 24 Oct 2013 15:19:11 +0000 (11:19 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 9 Nov 2013 00:52:00 +0000 (20:52 -0400)
commit96c0ce28f8288773870bff5a6ef1c43ff3a931f8
treee73cb062ce08cee5557e1a7f3e7a46f71581097d
parent23fb842e04938513517adfed860d8b40ad910096
emacs: Fix search tagging races

This fixes races in thread-local and global tagging in notmuch-search
(e.g., "+", "-", "a", "*", etc.).  Previously, these would modify tags
of new messages that arrived after the search.  Now they only operate
on the messages that were in the threads when the search was
performed.  This prevents surprises like archiving messages that
arrived in a thread after the search results were shown.

This eliminates `notmuch-search-find-thread-id-region(-search)'
because these functions strongly encouraged racy usage.

This fixes the two broken tests added by the previous patch.
devel/TODO
emacs/notmuch.el
test/emacs