--- /dev/null
+Return-Path: <todd@electricoding.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id DF3DB429E40\r
+ for <notmuch@notmuchmail.org>; Sat, 10 Jan 2015 06:29:05 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id eSpL4BX8JqB5 for <notmuch@notmuchmail.org>;\r
+ Sat, 10 Jan 2015 06:28:58 -0800 (PST)\r
+Received: from s75.web-hosting.com (s75.web-hosting.com [198.187.31.9])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id A2537431E84\r
+ for <notmuch@notmuchmail.org>; Sat, 10 Jan 2015 06:28:57 -0800 (PST)\r
+Received: from user-69-73-37-128.knology.net ([69.73.37.128]:33470\r
+ helo=localhost.localdomain)\r
+ by server75.web-hosting.com with esmtpsa (UNKNOWN:AES128-SHA256:128)\r
+ (Exim 4.82) (envelope-from <todd@electricoding.com>)\r
+ id 1Y9x28-0040bM-S9; Sat, 10 Jan 2015 09:28:57 -0500\r
+From: Todd <todd@electricoding.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3] emacs: Use the message cite variable instead of a calling\r
+ cite-message-original directly\r
+Date: Sat, 10 Jan 2015 08:28:32 -0600\r
+Message-Id: <1420900112-9187-1-git-send-email-todd@electricoding.com>\r
+X-Mailer: git-send-email 1.9.1\r
+In-Reply-To: <87sifjjbdf.fsf@maritornes.cs.unb.ca>\r
+References: <87sifjjbdf.fsf@maritornes.cs.unb.ca>\r
+X-AntiAbuse: This header was added to track abuse,\r
+ please include it with any abuse report\r
+X-AntiAbuse: Primary Hostname - server75.web-hosting.com\r
+X-AntiAbuse: Original Domain - notmuchmail.org\r
+X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]\r
+X-AntiAbuse: Sender Address Domain - electricoding.com\r
+X-Get-Message-Sender-Via: server75.web-hosting.com: authenticated_id:\r
+ todd@electricoding.com\r
+X-Source: \r
+X-Source-Args: \r
+X-Source-Dir: \r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 10 Jan 2015 14:29:07 -0000\r
+\r
+This fixes the test failure. I didn't have dtach installed, so the\r
+tests were being skipped earlier. As to why the test fails, it\r
+appears that the default for message-cite-function may depend on the\r
+version of Emacs that you use.\r
+\r
+This will likely cause notmuch replying to behave differently for\r
+users if they upgrade, even if they don't customize\r
+message-cite-function (in the case that it is not\r
+message-cite-original).\r
+\r
+Regarding the quotation changes in the test, it was not being\r
+interpreted correctly without the double quotes. I didn't look into\r
+it in much depth, just fixed it for my case.\r
+\r
+- Todd\r
+\r
+\r
+---\r
+ emacs/notmuch-mua.el | 6 +++---\r
+ test/T310-emacs.sh | 7 ++++---\r
+ 2 files changed, 7 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
+index 2c58886..66a6b65 100644\r
+--- a/emacs/notmuch-mua.el\r
++++ b/emacs/notmuch-mua.el\r
+@@ -220,8 +220,8 @@ list."\r
+ (date (plist-get original-headers :Date))\r
+ (start (point)))\r
+ \r
+- ;; message-cite-original constructs a citation line based on the From and Date\r
+- ;; headers of the original message, which are assumed to be in the buffer.\r
++ ;; message-cite-function should construct a citation line based on the From and\r
++ ;; Date headers of the original message, which are assumed to be in the buffer.\r
+ (insert "From: " from "\n")\r
+ (insert "Date: " date "\n\n")\r
+ \r
+@@ -233,7 +233,7 @@ list."\r
+ (set-mark (point))\r
+ (goto-char start)\r
+ ;; Quote the original message according to the user's configured style.\r
+- (message-cite-original)))\r
++ (funcall (or message-cite-function 'message-cite-original))))\r
+ \r
+ ;; Crypto processing based crypto content of the original message\r
+ (when process-crypto\r
+diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh\r
+index d72799b..74d9f58 100755\r
+--- a/test/T310-emacs.sh\r
++++ b/test/T310-emacs.sh\r
+@@ -378,10 +378,11 @@ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
+ test_begin_subtest "Reply within emacs to a multipart/mixed message"\r
+-test_emacs '(let ((message-hidden-headers ''()))\r
+- (notmuch-show "id:20091118002059.067214ed@hikari")\r
++test_emacs "(let ((message-hidden-headers '())\r
++ (message-cite-function 'message-cite-original))\r
++ (notmuch-show \"id:20091118002059.067214ed@hikari\")\r
+ (notmuch-show-reply)\r
+- (test-output))'\r
++ (test-output))"\r
+ sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+-- \r
+1.9.1\r
+\r