database error
[notmuch-archives.git] / b1 / f6b2120d6b9da1dcb2d4047a1803263b24b1ab
1 Return-Path: <BATV+416fd192af55372394e4+2437+infradead.org+hohndel@bombadil.srs.infradead.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 E1B994196F2\r
6         for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 15:36:26 -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: -2.608\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.608 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592,\r
13         RCVD_IN_DNSWL_MED=-2.3] autolearn=unavailable\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 FXL7z+tEET8B for <notmuch@notmuchmail.org>;\r
17         Mon, 26 Apr 2010 15:36:26 -0700 (PDT)\r
18 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])\r
19         by olra.theworths.org (Postfix) with ESMTP id F3C1F4196F3\r
20         for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 15:36:24 -0700 (PDT)\r
21 Received: from localhost ([::1] helo=x200.gr8dns.org)\r
22         by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux))\r
23         id 1O6Wud-0005XH-OK; Mon, 26 Apr 2010 22:36:23 +0000\r
24 Received: by x200.gr8dns.org (Postfix, from userid 500)\r
25         id 859FECC883; Mon, 26 Apr 2010 10:46:01 -0700 (PDT)\r
26 From: Dirk Hohndel <hohndel@infradead.org>\r
27 To: Carl Worth <cworth@cworth.org>, David Edmondson <dme@dme.org>,\r
28         notmuch@notmuchmail.org\r
29 Subject: Re: [PATCH] emacs: More DWIM when editing messages\r
30 In-Reply-To: <87d3xmdsxq.fsf@yoom.home.cworth.org>\r
31 References: <1272290485-14217-1-git-send-email-dme@dme.org>\r
32         <m3vdbejhu2.fsf@x200.gr8dns.org>\r
33         <87d3xmdsxq.fsf@yoom.home.cworth.org>\r
34 User-Agent: Notmuch/0.2-201-gebacd50 (http://notmuchmail.org) Emacs/23.1.1\r
35         (i386-redhat-linux-gnu)\r
36 Date: Mon, 26 Apr 2010 10:46:01 -0700\r
37 Message-ID: <m3wrvugl9i.fsf@x200.gr8dns.org>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=us-ascii\r
40 X-SRS-Rewrite: SMTP reverse-path rewritten from <hohndel@infradead.org> by\r
41         bombadil.infradead.org See http://www.infradead.org/rpr.html\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Mon, 26 Apr 2010 22:36:27 -0000\r
55 \r
56 On Mon, 26 Apr 2010 10:28:33 -0700, Carl Worth <cworth@cworth.org> wrote:\r
57 > On Mon, 26 Apr 2010 09:31:49 -0700, Dirk Hohndel <hohndel@infradead.org> wrote:\r
58 > > On Mon, 26 Apr 2010 15:01:25 +0100, David Edmondson <dme@dme.org> wrote:\r
59 > > > For composing new messages and forwarding, leave the cursor on the\r
60 > > > 'To:' field. For replies, leave the cursor at the start of the\r
61 > > > body. In all cases, mark the buffer as not modified so that the user\r
62 > > > is not prompted if she decides to immediately kill the buffer.\r
63 > > \r
64 > > YES! Brilliant. I didn't realize how much I wanted it till you sent\r
65 > > this. Carl, please include in 0.3\r
66\r
67 > Agreed! This is *so* pleasant.\r
68\r
69 > Thanks, David! This is pushed.\r
70 \r
71 And here is the promised fix to get signature in the correct spot:\r
72 \r
73 >From cbd9c96450f6481433877410bcf075d482b4be1b Mon Sep 17 00:00:00 2001\r
74 From: Dirk Hohndel <hohndel@infradead.org>\r
75 Date: Mon, 26 Apr 2010 10:41:49 -0700\r
76 Subject: [PATCH] Put signatures at the very end of the message\r
77 \r
78 The existing code inserts the signature before inserting the message\r
79 body (which it puts at the very end of the buffer - therefore AFTER\r
80 the signature). This little snippet makes us search backwards and\r
81 insert the message body before a signature, if it exists.\r
82 \r
83 This also fixes a small indentation issue in David's code.\r
84 \r
85 Signed-off-by: Dirk Hohndel <hohndel@infradead.org>\r
86 ---\r
87  emacs/notmuch-mua.el |    9 +++++++--\r
88  1 files changed, 7 insertions(+), 2 deletions(-)\r
89 \r
90 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
91 index c7a9aee..9fbb94a 100644\r
92 --- a/emacs/notmuch-mua.el\r
93 +++ b/emacs/notmuch-mua.el\r
94 @@ -98,11 +98,16 @@ list."\r
95                               collect header)))\r
96      (message-sort-headers)\r
97      (message-hide-headers)\r
98 +    ;; insert the message body - but put it in front of the signature\r
99 +    ;; if one is present\r
100      (goto-char (point-max))\r
101 +    (if (re-search-backward "-- " nil t)\r
102 +         (forward-line -1)\r
103 +      (goto-char (point-max)))\r
104      (insert body))\r
105 -    (set-buffer-modified-p nil)\r
106 +  (set-buffer-modified-p nil)\r
107  \r
108 -    (message-goto-body))\r
109 +  (message-goto-body))\r
110  \r
111  (defun notmuch-mua-forward-message ()\r
112    (message-forward)\r
113 -- \r
114 1.6.6.1\r
115 \r
116 \r
117 \r
118 -- \r
119 Dirk Hohndel\r
120 Intel Open Source Technology Center\r