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 B34AC431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 15 Apr 2012 10:38:56 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 R6lfBofc0Khi for <notmuch@notmuchmail.org>;
\r
17 Sun, 15 Apr 2012 10:38:55 -0700 (PDT)
\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 7812A431FAE
\r
22 for <notmuch@notmuchmail.org>; Sun, 15 Apr 2012 10:38:55 -0700 (PDT)
\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 1SJTPZ-0001OA-Bk; Sun, 15 Apr 2012 18:38:54 +0100
\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]
\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 1SJTPZ-0003EU-06; Sun, 15 Apr 2012 18:38:53 +0100
\r
32 From: Mark Walters <markwalters1009@gmail.com>
\r
33 To: Daniel Schoepe <daniel@schoepe.org>, notmuch@notmuchmail.org
\r
34 Subject: Re: [PATCH] emacs: Add configurable wrapping width for
\r
35 notmuch-wash-wrap-long-lines
\r
36 In-Reply-To: <1329503684-31289-1-git-send-email-daniel@schoepe.org>
\r
37 References: <1329503684-31289-1-git-send-email-daniel@schoepe.org>
\r
38 User-Agent: Notmuch/0.12+110~gbc97b4a (http://notmuchmail.org) Emacs/23.3.1
\r
39 (x86_64-pc-linux-gnu)
\r
40 Date: Sun, 15 Apr 2012 18:39:12 +0100
\r
41 Message-ID: <87fwc46gjj.fsf@qmul.ac.uk>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-Sender-Host-Address: 94.192.233.223
\r
45 X-QM-SPAM-Info: Sender has good ham record. :)
\r
46 X-QM-Body-MD5: 1c166aab3b4dd4b43bfaa2dbbffba692 (of first 20000 bytes)
\r
47 X-SpamAssassin-Score: -1.8
\r
48 X-SpamAssassin-SpamBar: -
\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
51 spam. We require at least 5.0 points to mark a message as spam.
\r
52 This message scored -1.8 points.
\r
53 Summary of the scoring:
\r
54 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,
\r
56 * [138.37.6.40 listed in list.dnswl.org]
\r
57 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
58 provider * (markwalters1009[at]gmail.com)
\r
59 * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
\r
61 * 0.5 AWL AWL: From: address is in the auto white-list
\r
62 X-QM-Scan-Virus: ClamAV says the message is clean
\r
63 X-BeenThere: notmuch@notmuchmail.org
\r
64 X-Mailman-Version: 2.1.13
\r
66 List-Id: "Use and development of the notmuch mail system."
\r
67 <notmuch.notmuchmail.org>
\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
71 List-Post: <mailto:notmuch@notmuchmail.org>
\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
75 X-List-Received-Date: Sun, 15 Apr 2012 17:38:56 -0000
\r
78 On Fri, 17 Feb 2012, Daniel Schoepe <daniel@schoepe.org> wrote:
\r
79 > This introduces a variable to control after how many characters a line
\r
80 > is wrapped by notmuch-wash-wrap-long-lines (still wrapping at the
\r
81 > window width if it is lower).
\r
85 This looks ok but I wonder if slightly different behaviour might be
\r
86 preferable (and looks simple to implement): rather then always wrapping
\r
87 at min of notmuch-wash-wrap-lines-length and window-width wrap at min of
\r
88 (notmuch-wash-wrap-lines-length + depth) and window-width. Then if you
\r
89 have a wide buffer you can still get 80 chars (say) of useful text even
\r
90 for well nested messages whilst not having very long lines anywhere.
\r
97 > emacs/notmuch-wash.el | 36 ++++++++++++++++++++++++++----------
\r
98 > 1 files changed, 26 insertions(+), 10 deletions(-)
\r
100 > diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
\r
101 > index 56981d0..7d003a2 100644
\r
102 > --- a/emacs/notmuch-wash.el
\r
103 > +++ b/emacs/notmuch-wash.el
\r
104 > @@ -87,6 +87,14 @@ If there is one more line than the sum of
\r
105 > `notmuch-wash-citation-lines-suffix', show that, otherwise
\r
106 > collapse the remaining lines into a button.")
\r
108 > +(defvar notmuch-wash-wrap-lines-length nil
\r
109 > + "Wrap line after at most this many characters.
\r
111 > +If this is nil, lines in messages will be wrapped to fit in the
\r
112 > +current window. If this is a number, lines will be wrapped after
\r
113 > +this many characters or at the window width (whichever one is
\r
116 > (defun notmuch-wash-toggle-invisible-action (cite-button)
\r
117 > (let ((invis-spec (button-get cite-button 'invisibility-spec)))
\r
118 > (if (invisible-p invis-spec)
\r
119 > @@ -276,16 +284,24 @@ Perform several transformations on the message body:
\r
122 > (defun notmuch-wash-wrap-long-lines (msg depth)
\r
123 > - "Wrap any long lines in the message to the width of the window.
\r
125 > -When doing so, maintaining citation leaders in the wrapped text."
\r
127 > - (let ((coolj-wrap-follows-window-size nil)
\r
128 > - (fill-column (- (window-width)
\r
130 > - ;; 2 to avoid poor interaction with
\r
131 > - ;; `word-wrap'.
\r
133 > + "Wrap long lines in the message.
\r
135 > +If `notmuch-wash-wrap-lines-length' is a number, this will wrap
\r
136 > +the message lines to the minimum of the width of the window or
\r
137 > +its value. Otherwise, this function will wrap long lines in the
\r
138 > +message at the window width. When doing so, citation leaders in
\r
139 > +the wrapped text are maintained."
\r
141 > + (let* ((coolj-wrap-follows-window-size nil)
\r
142 > + (limit (if (numberp notmuch-wash-wrap-lines-length)
\r
143 > + (min notmuch-wash-wrap-lines-length
\r
144 > + (window-width))
\r
145 > + (window-width)))
\r
146 > + (fill-column (- limit
\r
148 > + ;; 2 to avoid poor interaction with
\r
149 > + ;; `word-wrap'.
\r
151 > (coolj-wrap-region (point-min) (point-max))))
\r
157 > _______________________________________________
\r
158 > notmuch mailing list
\r
159 > notmuch@notmuchmail.org
\r
160 > http://notmuchmail.org/mailman/listinfo/notmuch
\r