Re: [PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / f5 / 09014776add5163783786c7169dac531965acb
1 Return-Path: <awg@lagos.xvx.ca>\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 772CC429E54\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 10:58:33 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 u1K-FPPPM-W0 for <notmuch@notmuchmail.org>;\r
16         Sun, 22 Jan 2012 10:58:32 -0800 (PST)\r
17 Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])\r
18         by olra.theworths.org (Postfix) with ESMTP id 95733429E40\r
19         for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 10:58:32 -0800 (PST)\r
20 Received: from pd3ml1so-ssvc.prod.shaw.ca ([10.0.141.140])\r
21         by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 22 Jan 2012 11:58:31 -0700\r
22 X-Cloudmark-SP-Filtered: true\r
23 X-Cloudmark-SP-Result: v=1.1 cv=MPNiKFfsidoaPqBs0kThsodqbsbgvPHp5CGEg9DOvhI=\r
24         c=1 sm=1\r
25         a=QF8m4hWxz6YA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
26         a=7343-z1_AAAA:8 a=m5C_-5U5OX2FoCRDEqMA:9 a=vUWflj0j9QKj9EB_nVkA:7\r
27         a=0c-eHkXYtrgA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
28 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
29         by pd3ml1so-dmz.prod.shaw.ca with ESMTP; 22 Jan 2012 11:58:31 -0700\r
30 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
31         id 31BDE8004203; Sun, 22 Jan 2012 11:58:31 -0700 (MST)\r
32 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
33 To: notmuch@notmuchmail.org\r
34 Subject: [PATCH v3 5/5] emacs: Use message-cite-original in reply\r
35 Date: Sun, 22 Jan 2012 11:58:18 -0700\r
36 Message-Id: <1327258698-23853-1-git-send-email-awg+notmuch@xvx.ca>\r
37 X-Mailer: git-send-email 1.7.5.4\r
38 In-Reply-To: <1326995217-27423-6-git-send-email-awg+notmuch@xvx.ca>\r
39 References: <1326995217-27423-6-git-send-email-awg+notmuch@xvx.ca>\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Sun, 22 Jan 2012 18:58:33 -0000\r
53 \r
54 Use message-mode's message-cite-original function to create the\r
55 quoted body for reply messages. In order to make this act like the\r
56 existing notmuch defaults, you will need to set the following in\r
57 your emacs configuration:\r
58 \r
59 message-citation-line-format "On %a, %d %b %Y, %f wrote:"\r
60 message-citation-line-function 'message-insert-formatted-citation-line\r
61 \r
62 The test has been updated to reflect the (ugly) emacs default.\r
63 ---\r
64 \r
65 Here is an alternate version of the patch, which uses message-cite-original.\r
66 \r
67 I suggest people try out this version and see if the behavior is\r
68 acceptable with some configuration tweaks. If it is, then we can\r
69 work on implementing the notmuch-emacs config file idea, and go\r
70 with this version. As I mentioned, the one thing I haven't figured\r
71 out how to do with configuration is make message-cite-original fill\r
72 the quoted message. This would probably be a dealbreaker for me, but\r
73 I suspect it can be done somehow with the right combination of hooks.\r
74 \r
75  emacs/notmuch-mua.el |   32 +++++++++++++++++++-------------\r
76  test/emacs           |    3 ++-\r
77  2 files changed, 21 insertions(+), 14 deletions(-)\r
78 \r
79 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
80 index 5ae0ccf..45c314d 100644\r
81 --- a/emacs/notmuch-mua.el\r
82 +++ b/emacs/notmuch-mua.el\r
83 @@ -21,6 +21,7 @@\r
84  \r
85  (require 'json)\r
86  (require 'message)\r
87 +(require 'format-spec)\r
88  \r
89  (require 'notmuch-lib)\r
90  (require 'notmuch-address)\r
91 @@ -134,19 +135,24 @@ list."\r
92           (forward-line -1)\r
93         (goto-char (point-max)))\r
94  \r
95 -      (insert (format "On %s, %s wrote:\n"\r
96 -                     (cdr (assq 'date original-headers))\r
97 -                     (cdr (assq 'from original-headers))))\r
98 -\r
99 -      (if plain-parts\r
100 -         (mapc (lambda (part) (notmuch-mua-insert-part-quoted part)) plain-parts)\r
101 -       (mapc (lambda (part)\r
102 -               (notmuch-mua-insert-part-quoted (notmuch-mua-parse-html-part part)))\r
103 -             html-parts))\r
104 -\r
105 -      (push-mark))\r
106 -    (set-buffer-modified-p nil))\r
107 -\r
108 +      (let ((from (cdr (assq 'from original-headers)))\r
109 +           (date (cdr (assq 'date original-headers)))\r
110 +           (start (point)))\r
111 +\r
112 +       (insert "From: " from "\n")\r
113 +       (insert "Date: " date "\n\n")\r
114 +      \r
115 +       (if plain-parts\r
116 +           (mapc 'insert plain-parts)\r
117 +         (mapc (lambda (part)\r
118 +                 (insert (notmuch-mua-parse-html-part part)))\r
119 +               html-parts))\r
120 +       (push-mark)\r
121 +       (goto-char start)\r
122 +       (message-cite-original))))\r
123 +\r
124 +  (push-mark)\r
125 +  (set-buffer-modified-p nil)\r
126    (message-goto-body))\r
127  \r
128  (defun notmuch-mua-forward-message ()\r
129 diff --git a/test/emacs b/test/emacs\r
130 index ac47b16..aecbf41 100755\r
131 --- a/test/emacs\r
132 +++ b/test/emacs\r
133 @@ -268,7 +268,8 @@ Subject: Re: Testing message sent via SMTP\r
134  In-Reply-To: <XXX>\r
135  Fcc: $(pwd)/mail/sent\r
136  --text follows this line--\r
137 -On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
138 +Notmuch Test Suite <test_suite@notmuchmail.org> writes:\r
139 +\r
140  > This is a test that messages are sent via SMTP\r
141  EOF\r
142  test_expect_equal_file OUTPUT EXPECTED\r
143 -- \r
144 1.7.5.4\r
145 \r