--- /dev/null
+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 25011431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 9 Sep 2013 06:56:54 -0700 (PDT)\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 I8h7weCTlFVp for <notmuch@notmuchmail.org>;\r
+ Mon, 9 Sep 2013 06:56:48 -0700 (PDT)\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 5B9B0431FAE\r
+ for <notmuch@notmuchmail.org>; Mon, 9 Sep 2013 06:56:48 -0700 (PDT)\r
+X-AuditID: 12074422-b7ef78e000000935-aa-522dd39d9712\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 36.31.02357.D93DD225; Mon, 9 Sep 2013 09:56:45 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r89DuipH021130; \r
+ Mon, 9 Sep 2013 09:56:45 -0400\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.8/8.12.4) with ESMTP id r89DufqF002473\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+ Mon, 9 Sep 2013 09:56:43 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1VJ1xI-0007ND-FM; Mon, 09 Sep 2013 09:56:40 -0400\r
+Date: Mon, 9 Sep 2013 09:56:39 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [PATCH] emacs: show: lazy part handling bugfix\r
+Message-ID: <20130909135637.GF1426@mit.edu>\r
+References: <87txhz14z6.fsf@qmul.ac.uk>\r
+ <1378510125-10245-1-git-send-email-markwalters1009@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1378510125-10245-1-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IRYrdT1517WTfIYOlKU4vVc3ksrt+cyezA\r
+ 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZbz7GFXQzF/RvG0CUwPjD+4uRk4OCQETibnv\r
+ drFD2GISF+6tZ+ti5OIQEtjHKDFj31MWCGcDo8S03rtsIFVCAqeYJBavkYVILGGUOPhnJVAV\r
+ BweLgIrE5nfZIDVsAhoS2/YvZwSxRQR0JG4fWgC2gVlAWuLb72YmEFtYwFri3srvzCA2r4C2\r
+ xNcTs1hBxggJpEt0XQmFCAtKnJz5hAWiVUvixr+XTCAlIGOW/+MACXMKeEk0XO4E2yQKdMCU\r
+ k9vYJjAKzULSPQtJ9yyE7gWMzKsYZVNyq3RzEzNzilOTdYuTE/PyUot0TfVyM0v0UlNKNzGC\r
+ w9lFaQfjz4NKhxgFOBiVeHgDjukGCbEmlhVX5h5ilORgUhLlvXERKMSXlJ9SmZFYnBFfVJqT\r
+ WnyIUYKDWUmEV/QwUI43JbGyKrUoHyYlzcGiJM777OnZQKB3E0tSs1NTC1KLYLIyHBxKErwX\r
+ LgE1ChalpqdWpGXmlCCkmTg4QYbzAA0/AFLDW1yQmFucmQ6RP8Woy/Fn5dxPjEIsefl5qVLi\r
+ vBdBigRAijJK8+DmwNLQK0ZxoLeEIUbxAFMY3KRXQEuYgJaIZIEtKUlESEk1MDJV/96gWJfJ\r
+ uPdopdvkj3s2vdvxtp1T4t3J9k2VS9vMdyk8kPfsL9HosW55Vxv0MG9bqmbGFqMnh2dtW/D+\r
+ 1ZcUw4tTNG33RL/aluvHmGnX5zVJ/9+kN3Wzd7xlLZy74Nr82CccYmUO4roVjm9PvOeQ8jCY\r
+ 82wBG8MSgZVHVFLkM319M/i+qCixFGckGmoxFxUnAgBf+9sOHgMAAA==\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: Mon, 09 Sep 2013 13:56:54 -0000\r
+\r
+Nice sleuthing! LGTM.\r
+\r
+One question, though. `notmuch-show-insert-bodypart' calls\r
+`notmuch-show-toggle-part-invisibility' with point at the end of the\r
+buffer and not on the button. Without this patch, properties will be\r
+nil as a result, but with this patch, they may not be. This still\r
+seems strictly more correct, but do you know why this is okay? Are\r
+the properties nil at this point regardless because the button is all\r
+in an overlay and we don't apply the :notmuch-part text property until\r
+after this call to `notmuch-show-toggle-part-invisibility'?\r
+\r
+Quoth Mark Walters on Sep 07 at 12:28 am:\r
+> The lazy part handler had a bug that it allowed the button to be\r
+> toggled to be specified. During toggling it needs to save and restore\r
+> the text-properties for the button but it actually saved the text\r
+> properties at point rather than from the button.\r
+> \r
+> In almost all cases this didn't matter as as point had the same text\r
+> properties as the button. However, it is a bug and did cause incorrect\r
+> behaviour in some cases: see id:87txhz14z6.fsf@qmul.ac.uk for details.\r
+> ---\r
+> This is exactly the same as the patch in the parent except it has a\r
+> commit message.\r
+> \r
+> Best wishes\r
+> \r
+> Mark\r
+> \r
+> \r
+> emacs/notmuch-show.el | 2 +-\r
+> 1 files changed, 1 insertions(+), 1 deletions(-)\r
+> \r
+> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+> index 20844f0..0267574 100644\r
+> --- a/emacs/notmuch-show.el\r
+> +++ b/emacs/notmuch-show.el\r
+> @@ -503,7 +503,7 @@ message at DEPTH in the current thread."\r
+> (new-start (button-start button))\r
+> (button-label (button-get button :base-label))\r
+> (old-point (point))\r
+> - (properties (text-properties-at (point)))\r
+> + (properties (text-properties-at (button-start button)))\r
+> (inhibit-read-only t))\r
+> ;; Toggle the button itself.\r
+> (button-put button :notmuch-part-hidden (not show))\r