Re: [PATCH v4 0/5] Use invisibility to toggle display of all parts including multipart
authorAustin Clements <amdragon@MIT.EDU>
Tue, 18 Dec 2012 17:10:21 +0000 (12:10 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:52:31 +0000 (09:52 -0800)
e9/30c43a5351c54039871d2f2ec69414ee72c298 [new file with mode: 0644]

diff --git a/e9/30c43a5351c54039871d2f2ec69414ee72c298 b/e9/30c43a5351c54039871d2f2ec69414ee72c298
new file mode 100644 (file)
index 0000000..5335028
--- /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 5AADB431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 09:10:27 -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 BCwyZTIsp8se for <notmuch@notmuchmail.org>;\r
+       Tue, 18 Dec 2012 09:10:26 -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 44030431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 09:10:26 -0800 (PST)\r
+X-AuditID: 12074422-b7fe46d0000008d2-78-50d0a3813741\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 8B.8F.02258.183A0D05; Tue, 18 Dec 2012 12:10:25 -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 qBIHAOAQ020621; \r
+       Tue, 18 Dec 2012 12:10:25 -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 qBIHAMWL022088\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Tue, 18 Dec 2012 12:10:23 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Tl0gP-000735-Rt; Tue, 18 Dec 2012 12:10:21 -0500\r
+Date: Tue, 18 Dec 2012 12:10:21 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH v4 0/5] Use invisibility to toggle display of all parts\r
+       including multipart\r
+Message-ID: <20121218171021.GL6187@mit.edu>\r
+References: <1355781287-6010-1-git-send-email-markwalters1009@gmail.com>\r
+       <87ip7zu4es.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87ip7zu4es.fsf@qmul.ac.uk>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IRYrdT0W1cfCHAYPcxKYvVc3ksrt+cyezA\r
+       5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZRydM5O14JZoxZkGhQbGqYJdjBwcEgImEluu\r
+       p3cxcgKZYhIX7q1n62Lk4hAS2Mco8WjVNXYIZwOjxNZ515ghnItMEieWP2WCcJYwSlw9OZ0Z\r
+       pJ9FQFXi/s/7rCA2m4CGxLb9yxlBbBEBHYnbhxawg9jMAtIS3343M4HYwgKJEjOmrAeL8wpo\r
+       S8zcsR2sXkggTWL2hYVMEHFBiZMzn7BA9GpJ3Pj3kgnkbJA5y/9xgIQ5gVYtP/IHbK2ogIrE\r
+       lJPb2CYwCs1C0j0LSfcshO4FjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdE31cjNL9FJTSjcx\r
+       gkPaRWkH48+DSocYBTgYlXh4f8SfDxBiTSwrrsw9xCjJwaQkyqs9/0KAEF9SfkplRmJxRnxR\r
+       aU5q8SFGCQ5mJRHecxOAcrwpiZVVqUX5MClpDhYlcd5rKTf9hQTSE0tSs1NTC1KLYLIyHBxK\r
+       EryFi4AaBYtS01Mr0jJzShDSTBycIMN5gIZzgtTwFhck5hZnpkPkTzHqcjS8vPGUUYglLz8v\r
+       VUqcV2sBUJEASFFGaR7cHFgqesUoDvSWMG8TyCgeYBqDm/QKaAkT0JIgPbAlJYkIKakGRs7P\r
+       5ofe3t45s1e2olr1613NZ+eZl1X4n9CJKel0yBGIE3Vx7HJ4Et2pr7Dj7brXHPOihFcL3F6+\r
+       3LGizivpBhNXyxopR/Hwu6rnvxvWXHjTbjzX3P/Oh9OHy072bbkdc/2CWafcxkPNJ9cWrbmx\r
+       x65b03zVlqeHDr1l77Lu+Lt5euMtwRarlUosxRmJhlrMRcWJACfCQO4gAwAA\r
+Cc: 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, 18 Dec 2012 17:10:27 -0000\r
+\r
+Quoth Mark Walters on Dec 18 at  8:54 am:\r
+> On Mon, 17 Dec 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+> > This is version 4 of this series (previous version at\r
+> > id:1355559338-14313-1-git-send-email-markwalters1009@gmail.com).\r
+> >\r
+> > The only change should be a bugfix which, for reasons I don't\r
+> > understand, only causes a problem on emacs 24. The problem is that the\r
+> > part invisibility code looks for a part button at the start of the\r
+> > region. This gets confused if there is a part with no part button\r
+> > (this is the case for the first part if it is text/plain) and the part\r
+> > starts with a button (as can happen if the message starts with the\r
+> > reply as in the first test in test/emacs-show).\r
+> >\r
+> > This checks that the button is a part button before creating the part\r
+> > overlay.\r
+> \r
+> I don't think the above is very clear so I will try to explain it more\r
+> fully. \r
+> \r
+> The invisibility overlay for a part needs to be `linked' to the part\r
+> header button so that the part header button can toggle the overlay\r
+> visibility. The overlay is created and linked to this button after the\r
+> whole part has been inserted (including any notmuch-wash stuff). \r
+> \r
+> I could have made insert-part-header return the button it made and pass\r
+> it back up the call chain to the the create-overlays function but\r
+> instead I chose to make create-overlays just take the button at the\r
+> start of the part.\r
+> \r
+> Now if the first part is text/plain then notmuch does not insert a\r
+> [text/plain] button so the code checks for this case by making sure the\r
+> part does start with a button, and if not it does not create the part\r
+> overlay (there is no button to toggle it so no point in an overlay).\r
+> \r
+> However, if the first part is text/plain and notmuch wash happens to\r
+> make a button at the very start of the part then the create-overlays\r
+> function did still create an overlay *and* link it to the button. This\r
+> linking overwrote some of the things notmuch wash had attached to its\r
+> button (eg the button :overlay property) and that caused things to\r
+> break.\r
+> \r
+> I still do not know why emacs 23 and emacs 24 behave differently, but\r
+> regardless the change from v3 is a clear bugfix: we just make sure it is\r
+> a notmuch-show-insert-part-header button not a notmuch-wash button\r
+> before we do the overlay creation/linking to the button. This version\r
+> does that by looking for a :base-label property of the button which\r
+> insert-part-header buttons have but notmuch-wash buttons do\r
+> not. (Obviously there are other ways this check could be done)\r
+\r
+Now I understand.  LGTM.  Do you want to go ahead and push this or\r
+would you rather get my wash/show cleanup in and push your reworked\r
+version of the series?\r