From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2F674431FAE for ; Wed, 9 Oct 2013 09:11:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1W+yqy0UmPb8 for ; Wed, 9 Oct 2013 09:11:26 -0700 (PDT) Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu [18.9.25.15]) by olra.theworths.org (Postfix) with ESMTP id 7DD85431FAF for ; Wed, 9 Oct 2013 09:11:26 -0700 (PDT) X-AuditID: 1209190f-b7fa08e0000009c6-c0-5255802d6008 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id 84.F8.02502.D2085525; Wed, 9 Oct 2013 12:11:26 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r99GBOFW020932; Wed, 9 Oct 2013 12:11:25 -0400 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r99GBNDm010359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 9 Oct 2013 12:11:24 -0400 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) (envelope-from ) id 1VTwM6-0005bp-Iq; Wed, 09 Oct 2013 12:11:22 -0400 Date: Wed, 9 Oct 2013 12:11:21 -0400 From: Austin Clements To: Mark Walters Subject: Re: [PATCH 00/11] Fix search tagging races Message-ID: <20131009161121.GR21611@mit.edu> References: <1381185201-25197-1-git-send-email-amdragon@mit.edu> <87a9ii28kn.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a9ii28kn.fsf@qmul.ac.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT19VrCA0y2PuK0WL1XB6L6zdnMjsw eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGZ83Rhfs5K+4d+IxawPjTJ4uRk4OCQETiUu7 drJC2GISF+6tZ+ti5OIQEtjHKDFt7TUoZwOjxMKO40wQzikmic97V7BDOEsYJS4/WcoE0s8i oCIx9cxcFhCbTUBDYtv+5YwgtoiAjsTtQwvYQWxmAWmJb7+bweqFBYwl1u88wQxi8wLVLJ26 FOwOIYE4iVs3IGbyCghKnJz5hAWiV0vixr+XQHEOsDnL/3GAhDmBVr3YvQxslSjQCVNObmOb wCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI10cvNLNFLTSndxAgKak5J /h2M3w4qHWIU4GBU4uGtKAsNEmJNLCuuzD3EKMnBpCTKO7kOKMSXlJ9SmZFYnBFfVJqTWnyI UYKDWUmEN64EKMebklhZlVqUD5OS5mBREue9yWEfJCSQnliSmp2aWpBaBJOV4eBQkuANqAdq FCxKTU+tSMvMKUFIM3FwggznARqeC1LDW1yQmFucmQ6RP8WoKCXO6wuSEABJZJTmwfXCks4r RnGgV4R5C0CqeIAJC677FdBgJqDB27+HgAwuSURISTUwti6aKOFWHPdA/NGiKfM3xqwPzUy6 /CuXc9ujQwfKg49bRPOVx3krPsou8T0h9P+bxqk1T86ZTnyUn354+Z+LDA9CmRRmJc25VHni vF2g064JRkuX7ryn9cxkRjnjC9W1x3W1N/xYFWV/3NnsxRS71Rcft//VmTS/8XBaPG/Ns9RK 6bxUxx1PTimxFGckGmoxFxUnAgDmzL5aFQMAAA== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 16:11:34 -0000 Quoth Mark Walters on Oct 09 at 8:43 am: > > On Mon, 07 Oct 2013, Austin Clements 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.") That's a very interesting point. Arguably, this is one situation where it's almost certainly safe to use the original query: if the search hasn't finished yet, almost certainly none of the threads have changed. So, that's one possibility. Another possibility would be to simply echo "Waiting for all search results... (Press C-g to cancel)" and wait until the search is done. > Best wishes > > Mark