Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / 8d / 6aa2d133ac35f80d0fdd5fd5537a83be928038
1 Return-Path: <todd@electricoding.com>\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 DF3DB429E40\r
6         for <notmuch@notmuchmail.org>; Sat, 10 Jan 2015 06:29:05 -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: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 eSpL4BX8JqB5 for <notmuch@notmuchmail.org>;\r
16         Sat, 10 Jan 2015 06:28:58 -0800 (PST)\r
17 Received: from s75.web-hosting.com (s75.web-hosting.com [198.187.31.9])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id A2537431E84\r
21         for <notmuch@notmuchmail.org>; Sat, 10 Jan 2015 06:28:57 -0800 (PST)\r
22 Received: from user-69-73-37-128.knology.net ([69.73.37.128]:33470\r
23         helo=localhost.localdomain)\r
24         by server75.web-hosting.com with esmtpsa (UNKNOWN:AES128-SHA256:128)\r
25         (Exim 4.82) (envelope-from <todd@electricoding.com>)\r
26         id 1Y9x28-0040bM-S9; Sat, 10 Jan 2015 09:28:57 -0500\r
27 From: Todd <todd@electricoding.com>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [PATCH v3] emacs: Use the message cite variable instead of a calling\r
30         cite-message-original directly\r
31 Date: Sat, 10 Jan 2015 08:28:32 -0600\r
32 Message-Id: <1420900112-9187-1-git-send-email-todd@electricoding.com>\r
33 X-Mailer: git-send-email 1.9.1\r
34 In-Reply-To: <87sifjjbdf.fsf@maritornes.cs.unb.ca>\r
35 References: <87sifjjbdf.fsf@maritornes.cs.unb.ca>\r
36 X-AntiAbuse: This header was added to track abuse,\r
37         please include it with any abuse report\r
38 X-AntiAbuse: Primary Hostname - server75.web-hosting.com\r
39 X-AntiAbuse: Original Domain - notmuchmail.org\r
40 X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]\r
41 X-AntiAbuse: Sender Address Domain - electricoding.com\r
42 X-Get-Message-Sender-Via: server75.web-hosting.com: authenticated_id:\r
43         todd@electricoding.com\r
44 X-Source: \r
45 X-Source-Args: \r
46 X-Source-Dir: \r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Sat, 10 Jan 2015 14:29:07 -0000\r
60 \r
61 This fixes the test failure.  I didn't have dtach installed, so the\r
62 tests were being skipped earlier.  As to why the test fails, it\r
63 appears that the default for message-cite-function may depend on the\r
64 version of Emacs that you use.\r
65 \r
66 This will likely cause notmuch replying to behave differently for\r
67 users if they upgrade, even if they don't customize\r
68 message-cite-function (in the case that it is not\r
69 message-cite-original).\r
70 \r
71 Regarding the quotation changes in the test, it was not being\r
72 interpreted correctly without the double quotes.  I didn't look into\r
73 it in much depth, just fixed it for my case.\r
74 \r
75 - Todd\r
76 \r
77 \r
78 ---\r
79  emacs/notmuch-mua.el | 6 +++---\r
80  test/T310-emacs.sh   | 7 ++++---\r
81  2 files changed, 7 insertions(+), 6 deletions(-)\r
82 \r
83 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
84 index 2c58886..66a6b65 100644\r
85 --- a/emacs/notmuch-mua.el\r
86 +++ b/emacs/notmuch-mua.el\r
87 @@ -220,8 +220,8 @@ list."\r
88             (date (plist-get original-headers :Date))\r
89             (start (point)))\r
90  \r
91 -       ;; message-cite-original constructs a citation line based on the From and Date\r
92 -       ;; headers of the original message, which are assumed to be in the buffer.\r
93 +       ;; message-cite-function should construct a citation line based on the From and\r
94 +       ;; Date headers of the original message, which are assumed to be in the buffer.\r
95         (insert "From: " from "\n")\r
96         (insert "Date: " date "\n\n")\r
97  \r
98 @@ -233,7 +233,7 @@ list."\r
99         (set-mark (point))\r
100         (goto-char start)\r
101         ;; Quote the original message according to the user's configured style.\r
102 -       (message-cite-original)))\r
103 +       (funcall (or message-cite-function 'message-cite-original))))\r
104  \r
105      ;; Crypto processing based crypto content of the original message\r
106      (when process-crypto\r
107 diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh\r
108 index d72799b..74d9f58 100755\r
109 --- a/test/T310-emacs.sh\r
110 +++ b/test/T310-emacs.sh\r
111 @@ -378,10 +378,11 @@ EOF\r
112  test_expect_equal_file OUTPUT EXPECTED\r
113  \r
114  test_begin_subtest "Reply within emacs to a multipart/mixed message"\r
115 -test_emacs '(let ((message-hidden-headers ''()))\r
116 -           (notmuch-show "id:20091118002059.067214ed@hikari")\r
117 +test_emacs "(let ((message-hidden-headers '())\r
118 +                  (message-cite-function 'message-cite-original))\r
119 +           (notmuch-show \"id:20091118002059.067214ed@hikari\")\r
120                 (notmuch-show-reply)\r
121 -               (test-output))'\r
122 +               (test-output))"\r
123  sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT\r
124  cat <<EOF >EXPECTED\r
125  From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
126 -- \r
127 1.9.1\r
128 \r