From: Austin Clements Date: Wed, 23 Oct 2013 00:19:52 +0000 (+2000) Subject: Re: [PATCH 0/8] Improve tag change completion X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d02b8f359170886183487e1759ce14f62ddda06f;p=notmuch-archives.git Re: [PATCH 0/8] Improve tag change completion --- diff --git a/c2/d94389dc1ec93e89c3021d17c6ba61b77d4ee0 b/c2/d94389dc1ec93e89c3021d17c6ba61b77d4ee0 new file mode 100644 index 000000000..c5d7b2bd2 --- /dev/null +++ b/c2/d94389dc1ec93e89c3021d17c6ba61b77d4ee0 @@ -0,0 +1,146 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 332D4431FBC + for ; Tue, 22 Oct 2013 17:20:05 -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 aM4Sl5pbkAN8 for ; + Tue, 22 Oct 2013 17:19:57 -0700 (PDT) +Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu + [18.7.68.34]) + by olra.theworths.org (Postfix) with ESMTP id A9758431FAE + for ; Tue, 22 Oct 2013 17:19:57 -0700 (PDT) +X-AuditID: 12074422-b7f5a8e000000a34-77-5267162cd29d +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP + id DF.B5.02612.C2617625; Tue, 22 Oct 2013 20:19:56 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r9N0JtIp013499; + Tue, 22 Oct 2013 20:19:56 -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 r9N0Jri0005132 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Tue, 22 Oct 2013 20:19:54 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1VYmAy-0000oG-SP; Tue, 22 Oct 2013 20:19:52 -0400 +Date: Tue, 22 Oct 2013 20:19:52 -0400 +From: Austin Clements +To: Mark Walters +Subject: Re: [PATCH 0/8] Improve tag change completion +Message-ID: <20131023001952.GD20337@mit.edu> +References: <1382471457-26056-1-git-send-email-amdragon@mit.edu> + <87mwm1x9pi.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87mwm1x9pi.fsf@qmul.ac.uk> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT0dURSw8yWPjTymL1XB6L6zdnMjsw + eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGQeeL2ctWCdR8W7hLvYGxrXCXYycHBICJhLN + r56xQdhiEhfurQezhQT2MUqs+lXVxcgFZG9klPjwvokRwjnNJHG/t4kdwlnCKPGj7xYLSAuL + gKrEr9dzmEFsNgENiW37lzOC2CICOhK3Dy1gB7GZBaQlvv1uZgKxhQXMJCY+7GcFsXmBaiYc + nwMU5wAaGifReF4PIiwocXLmExaIVi2JG/9egpWAjFn+jwMkzAm06eHxDrBNogIqElNObmOb + wCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI11cvNLNFLTSndxAgOaRel + HYw/DyodYhTgYFTi4X3QkhYkxJpYVlyZe4hRkoNJSZRXnT89SIgvKT+lMiOxOCO+qDQntfgQ + owQHs5IIb7MvUDlvSmJlVWpRPkxKmoNFSZz3Fod9kJBAemJJanZqakFqEUxWhoNDSYJXTBRo + qGBRanpqRVpmTglCmomDE2Q4D9BwY5Aa3uKCxNzizHSI/ClGRSlx3psiQAkBkERGaR5cLyzl + vGIUB3pFmPcLSBUPMF3Bdb8CGswENHjKEpCri0sSEVJSDYzZUXrvM4LUklZ4910u69/ZdOPt + 9qR5OQcUnE82MsZ/v8sk+V+X1WB1eH/Tn33TxDK82hSZGqO9NnR3RG2oT3faqGj2VLeq9cgV + 18Ov9ZTfBN2wiPxVUXwyu/uR0A3b5Gd717zbfvL4hu5Nq+QPf+hYWfbDfPI7d8O08PBfWd9y + lGTeVHyYc1eJpTgj0VCLuag4EQDI3bfwFAMAAA== +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, 23 Oct 2013 00:20:05 -0000 + +Quoth Mark Walters on Oct 22 at 10:43 pm: +> This looks good to me +1. It makes the code clearer and nicer to read as +> well as giving a better user experience, and it is makes fixing the long +> standing tagging races simpler. +> +> I have a couple of docstring comments: +> +> In patch 2 perhaps notmuch-tag-completions could have a docstring. + +Added. I noticed that I had failed to update the call from +`notmuch-select-tag-with-completion', so I fixed that, too. I don't +understand why we take lists of search terms in random places and +never use more than one element, but I suppose this series doesn't +make that any worse. + +> In Patch 4 I think the docstring for notmuch-search-tag is outdated: it +> is "Change tags for the currently selected thread or region." but +> beg and end can now be specified by the caller. + +I've left the first sentence as it is, since it's good interactive +documentation and a typical way to describe functions even if they +take a region as arguments (see, for example, `kill-region'). But +I've elaborated the rest of the docstring to be clearer about this. + +> and one actual comment: +> +> in patch 3 (for show) delete-dups is called before the list is passed to +> notmuch-read-tag-changes whereas it is not for search or pick. +> Obviously this is not actually a problem but it might be worth being +> consistent. + +Ah, whoops. I'd done this before I decided to handle duplicates in +`notmuch-read-tag-changes'. Since it's redundant, I've removed it. + +> But that was all I found. All tests pass and everything I try behaves +> exactly as expected. +> +> Best wishes +> +> Mark +> +> +> On Tue, 22 Oct 2013, Austin Clements wrote: +> > This series improves tag change completion in various ways for +> > commands like +, -, and *. +> > +> > From a user perspective, this provides command-specific prompts like +> > "Tag message" and "Tag all" instead of the generic "Tag" prompt, and +> > bases tag removal completions on the tags that are in the buffer, +> > rather than the current tags in the database, providing a more +> > predicable experience. +> > +> > From an implementation perspective, this new tag removal completion +> > behavior improves efficiency and eliminates a road block to fixing the +> > tagging race bug (which otherwise results in massive queries just to +> > compute removal completions). The new code is also more "Elispy" and +> > predictable because all tag change prompting now occurs at the +> > interactive entry points, rather than buried under several layers of +> > non-interactive calls. +> > +> > This is a spiritual successor to +> > id:1354263691-19715-1-git-send-email-markwalters1009@gmail.com, though +> > it takes a very different approach. This is also a prerequisite to +> > the tag race fix in +> > id:1381185201-25197-1-git-send-email-amdragon@mit.edu and I plan to +> > send an updated version of that series when this one is accepted. +> > +> > Patches 1, 5, and 6 could be pushed on their own. They fix bugs or +> > sort of bugs that get in the way of the rest of the series.