[PATCH 03/11] emacs: Fix coding system in `notmuch-show-view-raw-message'
authorAustin Clements <amdragon@MIT.EDU>
Mon, 21 Apr 2014 18:37:40 +0000 (14:37 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:49 +0000 (10:01 -0800)
a7/f344f8fa27fca2937c72b5ebf09498115e629b [new file with mode: 0644]

diff --git a/a7/f344f8fa27fca2937c72b5ebf09498115e629b b/a7/f344f8fa27fca2937c72b5ebf09498115e629b
new file mode 100644 (file)
index 0000000..1dd9a6d
--- /dev/null
@@ -0,0 +1,118 @@
+Return-Path: <amdragon@mit.edu>\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 EB355431FBC\r
+       for <notmuch@notmuchmail.org>; Mon, 21 Apr 2014 11:38:04 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 okquzmo0s8tU for <notmuch@notmuchmail.org>;\r
+       Mon, 21 Apr 2014 11:37:59 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (dmz-mailsec-scanner-3.mit.edu\r
+       [18.9.25.14])\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 F37E2431FBF\r
+       for <notmuch@notmuchmail.org>; Mon, 21 Apr 2014 11:37:58 -0700 (PDT)\r
+X-AuditID: 1209190e-f79ee6d000000c40-94-53556585835d\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 81.75.03136.58565535; Mon, 21 Apr 2014 14:37:57 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s3LIbubL022318; \r
+       Mon, 21 Apr 2014 14:37:57 -0400\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s3LIbsXb029712\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 21 Apr 2014 14:37:56 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1WcJ6I-0003kx-CD; Mon, 21 Apr 2014 14:37:54 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 03/11] emacs: Fix coding system in\r
+       `notmuch-show-view-raw-message'\r
+Date: Mon, 21 Apr 2014 14:37:40 -0400\r
+Message-Id: <1398105468-14317-4-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.9.1\r
+In-Reply-To: <1398105468-14317-1-git-send-email-amdragon@mit.edu>\r
+References: <1398105468-14317-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsUixG6nrtuaGhpscPCStcX1mzOZHRg9nq26\r
+       xRzAGMVlk5Kak1mWWqRvl8CV8f/McZaCXp6KU5/XsTYw9nB1MXJySAiYSDze84YRwhaTuHBv\r
+       PVsXIxeHkMBsJokJJxYyQjgbGSUWfPjCDOHcYZKYsugvE4Qzl1Fi2e0F7CD9bAIaEtv2Lweb\r
+       JSIgLbHz7mzWLkYODmYBNYk/XSogYWGBIIkJV+6zgdgsAqoSH779ByvnFXCQuHv7MzPEGXIS\r
+       J49NZgWxOQUcJdpWvwQbLwRUs2HvGqYJjPwLGBlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrr\r
+       5WaW6KWmlG5iBIUNpyTfDsavB5UOMQpwMCrx8BYYhQYLsSaWFVfmHmKU5GBSEuV9FQUU4kvK\r
+       T6nMSCzOiC8qzUktPsQowcGsJMK7XhMox5uSWFmVWpQPk5LmYFES531rbRUsJJCeWJKanZpa\r
+       kFoEk5Xh4FCS4L2ZAtQoWJSanlqRlplTgpBm4uAEGc4DNPwiSA1vcUFibnFmOkT+FKOilDhv\r
+       G0hCACSRUZoH1wuL61eM4kCvCPO2gFTxAFMCXPcroMFMQIOfbAkBGVySiJCSamCc8nqqrltH\r
+       V57UL9P9RwJua5dd9OFNmh73ZoHBUbk18jzJ/hoar5Nb03x97HZ9TBTa9XG/ttKD2iPi839e\r
+       EdFLuVuRzSVW07Y2fmtQTLftfaWkbxKv3/U8bXgpPe+P8u35jKW+AbveTmRkkuiTVn69+qnS\r
+       JQfbf5pcVVw7XvCkdu/bs7PKYYYSS3FGoqEWc1FxIgAsebxFxgIAAA==\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: Mon, 21 Apr 2014 18:38:05 -0000\r
+\r
+This fixes the known-broken test of viewing 8bit messages added by the\r
+previous commit.\r
+---\r
+ emacs/notmuch-show.el       | 5 +++--\r
+ test/T455-emacs-charsets.sh | 1 -\r
+ 2 files changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 949ac09..2b225df 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1748,11 +1748,12 @@ (defun notmuch-show-previous-open-message ()\r
+   (notmuch-show-message-adjust))\r
\r
+ (defun notmuch-show-view-raw-message ()\r
+-  "View the file holding the current message."\r
++  "View the original source of the current message."\r
+   (interactive)\r
+   (let* ((id (notmuch-show-get-message-id))\r
+        (buf (get-buffer-create (concat "*notmuch-raw-" id "*"))))\r
+-    (call-process notmuch-command nil buf nil "show" "--format=raw" id)\r
++    (let ((coding-system-for-read 'no-conversion))\r
++      (call-process notmuch-command nil buf nil "show" "--format=raw" id))\r
+     (switch-to-buffer buf)\r
+     (goto-char (point-min))\r
+     (set-buffer-modified-p nil)\r
+diff --git a/test/T455-emacs-charsets.sh b/test/T455-emacs-charsets.sh\r
+index a42a1d2..3078f9c 100755\r
+--- a/test/T455-emacs-charsets.sh\r
++++ b/test/T455-emacs-charsets.sh\r
+@@ -128,7 +128,6 @@ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
+ test_begin_subtest "8bit text message are not decoded when viewing"\r
+-test_subtest_known_broken\r
+ test_emacs '(notmuch-show "id:test-plain-8bit@example.com")\r
+           (notmuch-show-view-raw-message)\r
+           (test-visible-output "OUTPUT.raw")'\r
+-- \r
+1.9.1\r
+\r