Re: [PATCH v2] emacs: display tags in notmuch-show with links
authorAustin Clements <amdragon@MIT.EDU>
Tue, 20 Nov 2012 04:23:02 +0000 (23:23 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:45 +0000 (09:50 -0800)
04/e1845e20469a05f637a4317145bd296c65ce51 [new file with mode: 0644]

diff --git a/04/e1845e20469a05f637a4317145bd296c65ce51 b/04/e1845e20469a05f637a4317145bd296c65ce51
new file mode 100644 (file)
index 0000000..618d975
--- /dev/null
@@ -0,0 +1,130 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B0043431FC2\r
+       for <notmuch@notmuchmail.org>; Mon, 19 Nov 2012 20:23:07 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id xBPdyXcsnujQ for <notmuch@notmuchmail.org>;\r
+       Mon, 19 Nov 2012 20:23:07 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0F2D4431FBC\r
+       for <notmuch@notmuchmail.org>; Mon, 19 Nov 2012 20:23:06 -0800 (PST)\r
+X-AuditID: 12074422-b7f746d0000008cc-d7-50ab05aa1947\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 0D.6D.02252.AA50BA05; Mon, 19 Nov 2012 23:23:06 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qAK4N5iQ005671; \r
+       Mon, 19 Nov 2012 23:23:06 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAK4N2oH024486\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 19 Nov 2012 23:23:04 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TafMU-0008Qf-NN; Mon, 19 Nov 2012 23:23:02 -0500\r
+Date: Mon, 19 Nov 2012 23:23:02 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
+Subject: Re: [PATCH v2] emacs: display tags in notmuch-show with links\r
+Message-ID: <20121120042302.GF22284@mit.edu>\r
+References: <1353266322-20318-1-git-send-email-damien.cassou@gmail.com>\r
+       <87ip921pqu.fsf@betacantrips.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87ip921pqu.fsf@betacantrips.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpnleLIzCtJLcpLzFFi42IRYrdT0V3FujrAYPodKYtdd7cyWdzp2cVi\r
+       cf3mTGYHZo+ds+6yezxbdYs5gCmKyyYlNSezLLVI3y6BK+P9AZmCA4IVh9fOZ2xgfMHbxcjJ\r
+       ISFgIrHoZDsjhC0mceHeerYuRi4OIYF9jBJH165kgnA2MEocaDrFCOGcZJI48/ctK4SzhFGi\r
+       afVaVpB+FgFViZ3tC8FmsQloSGzbvxzI5uAQETCV+HtQHSTMLJAisbJjJzOILSzgJrHo5TEW\r
+       EJtXQEdi1YTrYGOEBLIlru3tY4OIC0qcnPmEBaJXS+LGv5dMICOZBaQllv/jAAlzCuhJnJy6\r
+       HKxcVEBFYsrJbWwTGIVmIemehaR7FkL3AkbmVYyyKblVurmJmTnFqcm6xcmJeXmpRbqmermZ\r
+       JXqpKaWbGMHh7aK0g/HnQaVDjAIcjEo8vA8SVgUIsSaWFVfmHmKU5GBSEuXt/wUU4kvKT6nM\r
+       SCzOiC8qzUktPsQowcGsJMLbVA6U401JrKxKLcqHSUlzsCiJ815LuekvJJCeWJKanZpakFoE\r
+       k5Xh4FCS4D3IsjpASLAoNT21Ii0zpwQhzcTBCTKcB2j4RZAa3uKCxNzizHSI/ClGRSlx3icg\r
+       CQGQREZpHlwvLP28YhQHekWY9wBIFQ8wdcF1vwIazAQ0+FrAcpDBJYkIKakGxlmHFxhXW6nm\r
+       zPs9wV3v1pIgv3JrZzcGdYUIjzUK05codb938mg4eKRuU+7HXOnSG1UhPx4kSu5f1tgQ+Vjm\r
+       eoTpnJs26bl65ceP9Gee/alQv1xy2WTrFw+0dojtXej0ccWD3c8OTC/ckhWg8ujBJZ/uN6kv\r
+       tY2CP8p38Kxf9NyaP+esu+reb0osxRmJhlrMRcWJACqkikgaAwAA\r
+Cc: notmuch mailing list <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 20 Nov 2012 04:23:07 -0000\r
+\r
+Quoth Ethan Glasser-Camp on Nov 18 at  5:59 pm:\r
+> Damien Cassou <damien.cassou@gmail.com> writes:\r
+> \r
+> > This patch obsoletes\r
+> > id:1352565719-12397-1-git-send-email-damien.cassou@gmail.com\r
+> >\r
+> > [PATCH 1/4] emacs: Add a thread's tags to emacs header-line\r
+> > [PATCH 2/4] emacs: Make tags in header-line clickable\r
+> > [PATCH 3/4] emacs: Make tags that appear in `notmuch-show' clickable\r
+> > [PATCH 4/4] emacs: Add unit-tests for clickable tags in notmuch-show\r
+> >\r
+> > This patch makes clickable all tags that appear in notmuch-show\r
+> > buffers. Each tag is a link to open a new notmuch-search buffer for\r
+> > this tag. Additionally, the buffer's header-line now shows the\r
+> > thread's tags (clickable only if the `header-button' library is loaded\r
+> > or loadable).\r
+> \r
+> Looks fine to me. Let me just get the notes from my bikeshed, in case\r
+> you get asked to roll another version :)\r
+> \r
+> - You might want to use #' on lambdas.\r
+> \r
+> - It bothers me how similar notmuch-tagger-{body,header}-button-action\r
+>   are. I thought it might be better to unify them by seeing what type\r
+>   the button argument was. Here's my (untested) approach which you might\r
+>   find prettier or uglier.\r
+> \r
+> (notmuch-tagger-all-button-get (button attrib)\r
+>   "Utility function to do button-get on different kinds of buttons."\r
+>   (cond\r
+>     ((integer-or-marker-p button)\r
+>       (button-get button attrib))\r
+>     ((and (featurep 'header-button)\r
+>           (listp button))\r
+>       (header-button-get button attrib))\r
+>     (t (error "unknown type of button %s" button))\r
+\r
+This seems like overkill given that all of the common code in\r
+notmuch-tagger-{body,header}-button-action is already abstracted into\r
+a common function.  Were there other places where code was duplicated\r
+because of the difference between regular buttons and header buttons?\r
+\r
+> - The comment for notmuch-tagger-make-body-link reads that it will work\r
+>   "everywhere except in the header-line". Does this mean mode-line, menu\r
+>   bar, or what? How about just "won't work in the header-line"?\r
+> \r
+> - In patch 3:\r
+> \r
+>  +If tags the result of this function is to be used within the\r
+> \r
+> I think this should just read "If the result".\r
+> \r
+> Ethan\r