Re: nevermore
[notmuch-archives.git] / cd / febc642cacf081ce3238a5e674f10fc74d2942
1 Return-Path: <jani@nikula.org>\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 16E72431FC2\r
6         for <notmuch@notmuchmail.org>; Wed, 28 Aug 2013 12:37:51 -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 qIGdBlyFP76n for <notmuch@notmuchmail.org>;\r
16         Wed, 28 Aug 2013 12:37:45 -0700 (PDT)\r
17 Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com\r
18         [209.85.215.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 4FB44431FAE\r
21         for <notmuch@notmuchmail.org>; Wed, 28 Aug 2013 12:37:45 -0700 (PDT)\r
22 Received: by mail-ea0-f176.google.com with SMTP id q16so3157538ead.21\r
23         for <notmuch@notmuchmail.org>; Wed, 28 Aug 2013 12:37:44 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=x-gm-message-state:from:to:subject:in-reply-to:references\r
27         :user-agent:date:message-id:mime-version:content-type;\r
28         bh=6NBiXcwH3U5AiEQd9LB+9N4i1hXbmfHevPdKRn68V6E=;\r
29         b=K82viNJBwZf5p0GYhtDxRXZe8+P3LJ5YgjbvuLjO67XEyYHXJc0JbwZ+XIaYSQrftp\r
30         ccDBPaKDe1AxXvvQsWwwxxMaW/ZvYJ3oxz0ucP/Cze9ZAoxmyh7HTZpNn9Wl91iySCTS\r
31         nJYWO7pHZEV8prn8NOS3xNrMFyVLyjfFigdcrV7wpJSGbkhbMwIReNBPxr3mOnAt2FOF\r
32         4RFnc79TY0R3pINAEdRvb0npvPa7RTCgLJkdxNAFhYyz4QKatLdJg1Wx7Qx96nQcWF24\r
33         k5GFeX+5SlGYIvj9Qk5rp/xCGEaWNVbV0by8XJ4zAjFeUDhrBeVUkJQXse/RM2RQtXNM\r
34         g8Rg==\r
35 X-Gm-Message-State:\r
36  ALoCoQl38H8W3R2+rAaJBgbeORyI3HTeTq/cfLWS7gkoZNF6U009hgrTsBJicsG2FRD+KgauQRLG\r
37 X-Received: by 10.14.241.74 with SMTP id f50mr45289685eer.29.1377718664101;\r
38         Wed, 28 Aug 2013 12:37:44 -0700 (PDT)\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
40         [88.195.111.91])\r
41         by mx.google.com with ESMTPSA id i1sm40049325eeg.0.1969.12.31.16.00.00\r
42         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
43         Wed, 28 Aug 2013 12:37:43 -0700 (PDT)\r
44 From: Jani Nikula <jani@nikula.org>\r
45 To: Tomi Ollila <tomi.ollila@iki.fi>,\r
46         Geoffrey Ferrari <geoffrey.ferrari@oriel.oxon.org>, notmuch@notmuchmail.org\r
47 Subject: Re: [PATCH] emacs: bugfix notmuch-mua-reply when signature is present\r
48 In-Reply-To: <m2ob8hy7da.fsf@guru.guru-group.fi>\r
49 References:\r
50  <1375961732-14327-1-git-send-email-geoffrey.ferrari@oriel.oxon.org>\r
51         <m2sixtyb5k.fsf@guru.guru-group.fi>     <m2ob8hy7da.fsf@guru.guru-group.fi>\r
52 User-Agent: Notmuch/0.16+38~g1735d93 (http://notmuchmail.org) Emacs/24.3.1\r
53         (x86_64-pc-linux-gnu)\r
54 Date: Wed, 28 Aug 2013 22:37:45 +0300\r
55 Message-ID: <87sixtsj1y.fsf@nikula.org>\r
56 MIME-Version: 1.0\r
57 Content-Type: text/plain\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Wed, 28 Aug 2013 19:37:51 -0000\r
71 \r
72 On Wed, 28 Aug 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
73 > On Wed, Aug 28 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
74 >\r
75 >> On Thu, Aug 08 2013, Geoffrey Ferrari <geoffrey.ferrari@oriel.oxon.org> wrote:\r
76 >>\r
77 >>> From: "Geoffrey H. Ferrari" <geoffrey.ferrari@oriel.oxon.org>\r
78 >>>\r
79 >>> When composing a reply, notmuch-mua-reply tries to be smart and cite\r
80 >>> the original message by inserting it before the user signature, if\r
81 >>> one is present. However, the existing method of backward searching\r
82 >>> from the end of the buffer to find the signature separator and then\r
83 >>> moving one line up results in the original message being cited in\r
84 >>> the message headers. That's because at this point the message looks\r
85 >>> like this (with | representing point after searching for the\r
86 >>> signature separator):\r
87 >>>\r
88 >>> From: xxx\r
89 >>> To: xxx\r
90 >>> Subject: xxx\r
91 >>> --text follows this line--\r
92 >>> |--\r
93 >>> My fancy signature\r
94 >>\r
95 >> Now that I tested, (with ~/.signature), composing new mail starts with\r
96 >>\r
97 >> --8<---8<---8<---8<---8<---8<---8<---8<---8<-\r
98 >> From: Tomi Ollila <tomi.ollila@iki.fi>\r
99 >> To:\r
100 >> Subject: \r
101 >> Fcc: /home/too/mail/mails/sent\r
102 >> --text follows this line--\r
103 >>\r
104 >> --\r
105 >> signature\r
106 >> --8<---8<---8<---8<---8<---8<---8<---8<---8<-\r
107 >>\r
108 >> Notice the empty line between '--text follows this line--' and '--'\r
109 >>\r
110 >> In your example, the signature block is -- for some reason --\r
111 >> inserted without the empty line.\r
112 >>\r
113 >>> With this patch, a newline is opened instead, so that the orignal\r
114 >>> message is cited above the signature but still in the message text.\r
115 >\r
116 > ....\r
117 >\r
118 >>>       (goto-char (point-max))\r
119 >>>       (if (re-search-backward message-signature-separator nil t)\r
120 >>>-      (forward-line -1)\r
121 >>>+      (newline)\r
122 >>>     (goto-char (point-max)))\r
123 >\r
124 > If the case is like I think, it should have used (open-line 1) instead.\r
125 >\r
126 > Anyway, what about:\r
127 \r
128 Hi Tomi, what about [1] instead? KISS and all that.\r
129 \r
130 Cheers,\r
131 Jani.\r
132 \r
133 [1] id:cover.1377718199.git.jani@nikula.org\r
134 \r
135 \r
136 >\r
137 >     (goto-char (point-max))\r
138 >     (when (re-search-backward message-signature-separator nil t)\r
139 >       (forward-line -1)\r
140 >       (unless (eolp)\r
141 >         (end-of-line)\r
142 >         (newline)))\r
143 >\r
144 > The else clause with (goto-char (point-max)) is unnecessary as \r
145 > with the third argument NOERROR being t point is moved if\r
146 > re-search-backward doesn't find match.\r
147 >\r
148 >>> ---\r
149 >>\r
150 >> Tomi\r
151 >\r
152 > Tomi\r
153 > _______________________________________________\r
154 > notmuch mailing list\r
155 > notmuch@notmuchmail.org\r
156 > http://notmuchmail.org/mailman/listinfo/notmuch\r
157 \r
158 -- \r
159 whoaaa \r
160 \r
161 asdfasfd\r