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 27B24431FD9
\r
6 for <notmuch@notmuchmail.org>; Fri, 6 Sep 2013 10:16:19 -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 7QDAmgVVXCyG for <notmuch@notmuchmail.org>;
\r
17 Fri, 6 Sep 2013 10:16:15 -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 2EA4A431FBF
\r
22 for <notmuch@notmuchmail.org>; Fri, 6 Sep 2013 10:16:15 -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 1VHzdl-0001zm-Dw; Fri, 06 Sep 2013 18:16:14 +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 1VHzdl-0003O7-5B; Fri, 06 Sep 2013 18:16:13 +0100
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when
\r
35 In-Reply-To: <1378477938-26020-1-git-send-email-tomi.ollila@iki.fi>
\r
36 References: <1378477938-26020-1-git-send-email-tomi.ollila@iki.fi>
\r
37 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1
\r
38 (x86_64-pc-linux-gnu)
\r
39 Date: Fri, 06 Sep 2013 18:16:11 +0100
\r
40 Message-ID: <87a9jpg9b8.fsf@qmul.ac.uk>
\r
42 Content-Type: text/plain; charset=us-ascii
\r
43 X-Sender-Host-Address: 93.97.24.31
\r
44 X-QM-SPAM-Info: Sender has good ham record. :)
\r
45 X-QM-Body-MD5: 7f8cbb3abb8ac1ed5150c2d39fdac44a (of first 20000 bytes)
\r
46 X-SpamAssassin-Score: 0.0
\r
47 X-SpamAssassin-SpamBar: /
\r
48 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
50 spam. We require at least 5.0 points to mark a message as spam.
\r
51 This message scored 0.0 points. Summary of the scoring:
\r
52 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
53 provider * (markwalters1009[at]gmail.com)
\r
54 * 0.0 AWL AWL: From: address is in the auto white-list
\r
55 X-QM-Scan-Virus: ClamAV says the message is clean
\r
56 Cc: tomi.ollila@iki.fi
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Fri, 06 Sep 2013 17:16:19 -0000
\r
76 On Fri, 06 Sep 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
77 > When composing a reply, notmuch-mua-reply attempts to cite the
\r
78 > the original message by inserting it before the user signature, if
\r
79 > one is present. The existing method used to search the signature
\r
80 > separator backward from the end of the buffer and then move one
\r
81 > line up. In case of variable `message-signature-insert-empty-line'
\r
82 > being nil this caused point to go to the beginning of
\r
83 > '--text follows this line--'
\r
84 > separator line, and citation was inserted there.
\r
85 > This change checks the value of `message-signature-insert-empty-line'
\r
86 > and doesn't move point if that is nil. Additional narrowing to
\r
87 > the body region ensures that point never goes to the separator line
\r
89 > `message-signature-setup-hook' or `message-setup-hook' may already have
\r
90 > added some other content to the message body, therefore using simply
\r
91 > (message-goto-body) to move point to the beginning of body might lead
\r
92 > to unexpected results.
\r
94 > Original patch from "Geoffrey H. Ferrari", continued with iterations
\r
95 > from Jani and Mark.
\r
100 > id:1378322458-30159-1-git-send-email-tomi.ollila@iki.fi
\r
102 > with comment changes only.
\r
106 > emacs/notmuch-mua.el | 15 ++++++++++-----
\r
107 > 1 file changed, 10 insertions(+), 5 deletions(-)
\r
109 > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
110 > index ff8149b..d41c0b3 100644
\r
111 > --- a/emacs/notmuch-mua.el
\r
112 > +++ b/emacs/notmuch-mua.el
\r
113 > @@ -196,11 +196,16 @@ list."
\r
114 > nil (notmuch-mua-get-switch-function))))
\r
116 > ;; Insert the message body - but put it in front of the signature
\r
117 > - ;; if one is present
\r
118 > - (goto-char (point-max))
\r
119 > - (if (re-search-backward message-signature-separator nil t)
\r
120 > - (forward-line -1)
\r
121 > - (goto-char (point-max)))
\r
122 > + ;; if one is present, and after any other content
\r
123 > + ;; message*setup-hooks may have added to the message body already.
\r
124 > + (save-restriction
\r
125 > + (message-goto-body)
\r
126 > + (narrow-to-region (point) (point-max))
\r
127 > + (goto-char (point-max))
\r
128 > + (if (re-search-backward message-signature-separator nil t)
\r
129 > + (if message-signature-insert-empty-line
\r
130 > + (forward-line -1))
\r
131 > + (goto-char (point-max))))
\r
133 > (let ((from (plist-get original-headers :From))
\r
134 > (date (plist-get original-headers :Date))
\r
138 > _______________________________________________
\r
139 > notmuch mailing list
\r
140 > notmuch@notmuchmail.org
\r
141 > http://notmuchmail.org/mailman/listinfo/notmuch
\r