Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 55 / 9e3df30f42dc9d57da2691bfcc415c8959b42e
1 Return-Path: <m.walters@qmul.ac.uk>\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 20952431FB6\r
6         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 01:38:16 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id z5muYdBIl45a for <notmuch@notmuchmail.org>;\r
17         Sun, 12 Feb 2012 01:38:15 -0800 (PST)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 49C84431FAE\r
22         for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 01:38:15 -0800 (PST)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1RwVsr-0001SA-KC; Sun, 12 Feb 2012 09:38:13 +0000\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
28         helo=localhost)\r
29         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
30         (envelope-from <m.walters@qmul.ac.uk>)\r
31         id 1RwVsr-0006L5-9V; Sun, 12 Feb 2012 09:38:13 +0000\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: David Edmondson <dme@dme.org>, notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH v3 3/3] emacs: Don't insert a part header if it's the\r
35         first part and text/*.\r
36 In-Reply-To: <87r4y0ieva.fsf@qmul.ac.uk>\r
37 References: <1327052612-1040-1-git-send-email-dme@dme.org>\r
38         <1328542748-19530-1-git-send-email-dme@dme.org>\r
39         <1328542748-19530-5-git-send-email-dme@dme.org>\r
40         <87r4y0ieva.fsf@qmul.ac.uk>\r
41 User-Agent: Notmuch/0.11.1+172~g6a5d2c5 (http://notmuchmail.org) Emacs/23.2.1\r
42         (i486-pc-linux-gnu)\r
43 Date: Sun, 12 Feb 2012 09:39:32 +0000\r
44 Message-ID: <87fweg1jcb.fsf@qmul.ac.uk>\r
45 MIME-Version: 1.0\r
46 Content-Type: text/plain; charset=us-ascii\r
47 X-Sender-Host-Address: 94.192.233.223\r
48 X-QM-SPAM-Info: Sender has good ham record.  :)\r
49 X-QM-Body-MD5: 95fa201e58d8ffc27aa9d83b184efb89 (of first 20000 bytes)\r
50 X-SpamAssassin-Score: -1.8\r
51 X-SpamAssassin-SpamBar: -\r
52 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
53         determine if it is\r
54         spam. We require at least 5.0 points to mark a message as spam.\r
55         This message scored -1.8 points.\r
56         Summary of the scoring: \r
57         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
58         *      medium trust\r
59         *      [138.37.6.40 listed in list.dnswl.org]\r
60         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
61         provider *      (markwalters1009[at]gmail.com)\r
62         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
63         *      domain\r
64         *  0.5 AWL AWL: From: address is in the auto white-list\r
65 X-QM-Scan-Virus: ClamAV says the message is clean\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Sun, 12 Feb 2012 09:38:16 -0000\r
79 \r
80 \r
81 On Sun, 12 Feb 2012 09:24:09 +0000, Mark Walters <markwalters1009@gmail.com> wrote:\r
82 > On Mon,  6 Feb 2012 15:39:08 +0000, David Edmondson <dme@dme.org> wrote:\r
83 > > Previously this logic applied only to text/plain. Allow it for other\r
84 > > text/* parts as well.\r
85\r
86 > What is the reason for treating the first part differently? \r
87\r
88 > Personally, I would prefer to keep it as now since pressing v on the\r
89 > [text/html] `views' the message in my mailcap preferred html viewer\r
90 > which can be convenient.\r
91 \r
92 Actually I experimented with this and if I remove the special case\r
93 totally (i.e., for text/plain as well) I get a button which lets me save\r
94 the text part of the email fixing the problem I mentioned in\r
95 id:"87y5tl3xz0.fsf@qmul.ac.uk"\r
96 \r
97 I wonder if it would be possible to always include the button but\r
98 possibly at the end rather than the start of the message? Or possibly\r
99 add a view-mime-part-structure function which showed all the buttons.\r
100 \r
101 Best wishes\r
102 \r
103 Mark\r
104 \r
105\r
106 > Thanks\r
107\r
108 > Mark\r
109\r
110\r
111 > > ---\r
112 > >  emacs/notmuch-show.el |    9 ++++-----\r
113 > >  1 files changed, 4 insertions(+), 5 deletions(-)\r
114 > > \r
115 > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
116 > > index ce79762..c60e613 100644\r
117 > > --- a/emacs/notmuch-show.el\r
118 > > +++ b/emacs/notmuch-show.el\r
119 > > @@ -412,7 +412,9 @@ CONTENT-TYPE parts."\r
120 > >  (defun notmuch-show-insert-part-header (nth content-type declared-type\r
121 > >                                         &optional name comment\r
122 > >                                         &rest button-parameters)\r
123 > > -  (unless (notmuch-show-hidden-part-header content-type)\r
124 > > +  (unless (or (notmuch-show-hidden-part-header content-type)\r
125 > > +         (and (= nth 1)\r
126 > > +              (string-match "text/*" content-type)))\r
127 > >      (apply #'insert-button\r
128 > >        (concat "[ "\r
129 > >                (if name (concat name ": ") "")\r
130 > > @@ -703,10 +705,7 @@ current buffer, if possible."\r
131 > >  \r
132 > >  (defun notmuch-show-insert-part-text/plain (msg part content-type nth depth declared-type)\r
133 > >    (let ((start (point)))\r
134 > > -    ;; If this text/plain part is not the first part in the message,\r
135 > > -    ;; insert a header to make this clear.\r
136 > > -    (if (> nth 1)\r
137 > > -   (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename)))\r
138 > > +    (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename))\r
139 > >      (insert (notmuch-show-get-bodypart-content msg part nth))\r
140 > >      (save-excursion\r
141 > >        (save-restriction\r
142 > > -- \r
143 > > 1.7.8.3\r
144 > > \r
145 > > _______________________________________________\r
146 > > notmuch mailing list\r
147 > > notmuch@notmuchmail.org\r
148 > > http://notmuchmail.org/mailman/listinfo/notmuch\r