Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 40 / 3b132b622eedd717144e042834e183e5e28a15
1 Return-Path: <amdragon@mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 25011431FAF\r
6         for <notmuch@notmuchmail.org>; Mon,  9 Sep 2013 06:56:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id I8h7weCTlFVp for <notmuch@notmuchmail.org>;\r
16         Mon,  9 Sep 2013 06:56:48 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
18         [18.7.68.34])\r
19         by olra.theworths.org (Postfix) with ESMTP id 5B9B0431FAE\r
20         for <notmuch@notmuchmail.org>; Mon,  9 Sep 2013 06:56:48 -0700 (PDT)\r
21 X-AuditID: 12074422-b7ef78e000000935-aa-522dd39d9712\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 36.31.02357.D93DD225; Mon,  9 Sep 2013 09:56:45 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r89DuipH021130; \r
27         Mon, 9 Sep 2013 09:56:45 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r89DufqF002473\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Mon, 9 Sep 2013 09:56:43 -0400\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1VJ1xI-0007ND-FM; Mon, 09 Sep 2013 09:56:40 -0400\r
37 Date: Mon, 9 Sep 2013 09:56:39 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Mark Walters <markwalters1009@gmail.com>\r
40 Subject: Re: [PATCH] emacs: show: lazy part handling bugfix\r
41 Message-ID: <20130909135637.GF1426@mit.edu>\r
42 References: <87txhz14z6.fsf@qmul.ac.uk>\r
43         <1378510125-10245-1-git-send-email-markwalters1009@gmail.com>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Content-Disposition: inline\r
47 In-Reply-To: <1378510125-10245-1-git-send-email-markwalters1009@gmail.com>\r
48 User-Agent: Mutt/1.5.21 (2010-09-15)\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IRYrdT1517WTfIYOlKU4vVc3ksrt+cyezA\r
51         5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZbz7GFXQzF/RvG0CUwPjD+4uRk4OCQETibnv\r
52         drFD2GISF+6tZ+ti5OIQEtjHKDFj31MWCGcDo8S03rtsIFVCAqeYJBavkYVILGGUOPhnJVAV\r
53         BweLgIrE5nfZIDVsAhoS2/YvZwSxRQR0JG4fWgC2gVlAWuLb72YmEFtYwFri3srvzCA2r4C2\r
54         xNcTs1hBxggJpEt0XQmFCAtKnJz5hAWiVUvixr+XTCAlIGOW/+MACXMKeEk0XO4E2yQKdMCU\r
55         k9vYJjAKzULSPQtJ9yyE7gWMzKsYZVNyq3RzEzNzilOTdYuTE/PyUot0TfVyM0v0UlNKNzGC\r
56         w9lFaQfjz4NKhxgFOBiVeHgDjukGCbEmlhVX5h5ilORgUhLlvXERKMSXlJ9SmZFYnBFfVJqT\r
57         WnyIUYKDWUmEV/QwUI43JbGyKrUoHyYlzcGiJM777OnZQKB3E0tSs1NTC1KLYLIyHBxKErwX\r
58         LgE1ChalpqdWpGXmlCCkmTg4QYbzAA0/AFLDW1yQmFucmQ6RP8Woy/Fn5dxPjEIsefl5qVLi\r
59         vBdBigRAijJK8+DmwNLQK0ZxoLeEIUbxAFMY3KRXQEuYgJaIZIEtKUlESEk1MDJV/96gWJfJ\r
60         uPdopdvkj3s2vdvxtp1T4t3J9k2VS9vMdyk8kPfsL9HosW55Vxv0MG9bqmbGFqMnh2dtW/D+\r
61         1ZcUw4tTNG33RL/aluvHmGnX5zVJ/9+kN3Wzd7xlLZy74Nr82CccYmUO4roVjm9PvOeQ8jCY\r
62         82wBG8MSgZVHVFLkM319M/i+qCixFGckGmoxFxUnAgBf+9sOHgMAAA==\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Mon, 09 Sep 2013 13:56:54 -0000\r
77 \r
78 Nice sleuthing!  LGTM.\r
79 \r
80 One question, though.  `notmuch-show-insert-bodypart' calls\r
81 `notmuch-show-toggle-part-invisibility' with point at the end of the\r
82 buffer and not on the button.  Without this patch, properties will be\r
83 nil as a result, but with this patch, they may not be.  This still\r
84 seems strictly more correct, but do you know why this is okay?  Are\r
85 the properties nil at this point regardless because the button is all\r
86 in an overlay and we don't apply the :notmuch-part text property until\r
87 after this call to `notmuch-show-toggle-part-invisibility'?\r
88 \r
89 Quoth Mark Walters on Sep 07 at 12:28 am:\r
90 > The lazy part handler had a bug that it allowed the button to be\r
91 > toggled to be specified. During toggling it needs to save and restore\r
92 > the text-properties for the button but it actually saved the text\r
93 > properties at point rather than from the button.\r
94\r
95 > In almost all cases this didn't matter as as point had the same text\r
96 > properties as the button. However, it is a bug and did cause incorrect\r
97 > behaviour in some cases: see id:87txhz14z6.fsf@qmul.ac.uk for details.\r
98 > ---\r
99 > This is exactly the same as the patch in the parent except it has a\r
100 > commit message.\r
101\r
102 > Best wishes\r
103\r
104 > Mark\r
105\r
106\r
107 >  emacs/notmuch-show.el |    2 +-\r
108 >  1 files changed, 1 insertions(+), 1 deletions(-)\r
109\r
110 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
111 > index 20844f0..0267574 100644\r
112 > --- a/emacs/notmuch-show.el\r
113 > +++ b/emacs/notmuch-show.el\r
114 > @@ -503,7 +503,7 @@ message at DEPTH in the current thread."\r
115 >            (new-start (button-start button))\r
116 >            (button-label (button-get button :base-label))\r
117 >            (old-point (point))\r
118 > -          (properties (text-properties-at (point)))\r
119 > +          (properties (text-properties-at (button-start button)))\r
120 >            (inhibit-read-only t))\r
121 >       ;; Toggle the button itself.\r
122 >       (button-put button :notmuch-part-hidden (not show))\r