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 30161431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 1 Sep 2013 07:54:41 -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 Vsto+rcqyeL3 for <notmuch@notmuchmail.org>;
\r
17 Sun, 1 Sep 2013 07:54:34 -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 39199431FAE
\r
22 for <notmuch@notmuchmail.org>; Sun, 1 Sep 2013 07:54:34 -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 1VG92q-0000hU-M6; Sun, 01 Sep 2013 15:54:29 +0100
\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)
\r
28 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1VG92q-0001FX-A5; Sun, 01 Sep 2013 15:54:28 +0100
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH v2] emacs: insert quotable parts in reply as they are
\r
34 displayed in show view
\r
35 In-Reply-To: <87ppsvp1i9.fsf@qmul.ac.uk>
\r
36 References: <1377633044-22044-1-git-send-email-jani@nikula.org>
\r
37 <1377791611-29506-1-git-send-email-jani@nikula.org>
\r
38 <87ppsvp1i9.fsf@qmul.ac.uk>
\r
39 User-Agent: Notmuch/0.15.2+269~g01f5508 (http://notmuchmail.org) Emacs/23.4.1
\r
40 (x86_64-pc-linux-gnu)
\r
41 Date: Sun, 01 Sep 2013 15:54:27 +0100
\r
42 Message-ID: <87eh98twws.fsf@qmul.ac.uk>
\r
44 Content-Type: text/plain; charset=us-ascii
\r
45 X-Sender-Host-Address: 93.97.24.31
\r
46 X-QM-SPAM-Info: Sender has good ham record. :)
\r
47 X-QM-Body-MD5: 2f39fcaafe68e7cdf253f1ca72370508 (of first 20000 bytes)
\r
48 X-SpamAssassin-Score: 0.0
\r
49 X-SpamAssassin-SpamBar: /
\r
50 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
52 spam. We require at least 5.0 points to mark a message as spam.
\r
53 This message scored 0.0 points. Summary of the scoring:
\r
54 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
55 provider * (markwalters1009[at]gmail.com)
\r
56 * 0.0 AWL AWL: From: address is in the auto white-list
\r
57 X-QM-Scan-Virus: ClamAV says the message is clean
\r
58 Cc: Tomi Ollila <tomi.ollila@iki.fi>
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Sun, 01 Sep 2013 14:54:41 -0000
\r
74 Here is a slightly better (I think) version of this. If we use a
\r
75 temp-buffer we don't need the narrowing or point movement as the insert
\r
76 buffer-string should get that right.
\r
82 >From d0925d374411cf5031832f4d72b6fb5d21a45b21 Mon Sep 17 00:00:00 2001
\r
83 From: Mark Walters <markwalters1009@gmail.com>
\r
84 Date: Fri, 30 Aug 2013 17:43:46 +0100
\r
85 Subject: [PATCH] tweak
\r
88 emacs/notmuch-mua.el | 17 +++++++++--------
\r
89 1 files changed, 9 insertions(+), 8 deletions(-)
\r
91 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
92 index e7cc94e..ff8149b 100644
\r
93 --- a/emacs/notmuch-mua.el
\r
94 +++ b/emacs/notmuch-mua.el
\r
95 @@ -130,14 +130,15 @@ list."
\r
98 (defun notmuch-mua-insert-quotable-part (message part)
\r
100 - (narrow-to-region (point-min) (point))
\r
101 - ;; We don't want hooks, such as notmuch-wash-*, to be run on the
\r
102 - ;; quotable part.
\r
103 - (let ((notmuch-show-insert-text/plain-hook nil))
\r
104 - ;; Show the part but do not add buttons.
\r
105 - (notmuch-show-insert-bodypart message part 0 'no-buttons))
\r
106 - (goto-char (point-max))))
\r
107 + ;; We don't want text properties leaking from the show renderer into
\r
108 + ;; the reply so we use a temp buffer. Also we don't want hooks, such
\r
109 + ;; as notmuch-wash-*, to be run on the quotable part so we set
\r
110 + ;; notmuch-show-insert-text/plain-hook to nil.
\r
111 + (insert (with-temp-buffer
\r
112 + (let ((notmuch-show-insert-text/plain-hook nil))
\r
113 + ;; Show the part but do not add buttons.
\r
114 + (notmuch-show-insert-bodypart message part 0 'no-buttons))
\r
115 + (buffer-substring-no-properties (point-min) (point-max)))))
\r
117 ;; There is a bug in emacs 23's message.el that results in a newline
\r
118 ;; not being inserted after the References header, so the next header
\r