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 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 21 Sep 2014 19:23:45 +0000 (21:23 +0200)
This fixes the known-broken test of viewing 8bit messages added by the
previous commit.

emacs/notmuch-show.el
test/T455-emacs-charsets.sh

index aabe56e242018068ee4c4483ac6cc406a0a5b5d3..a9974826e824133e1d905986d7d4343ad9e1aacc 100644 (file)
@@ -1792,11 +1792,12 @@ to show, nil otherwise."
   (notmuch-show-message-adjust))
 
 (defun notmuch-show-view-raw-message ()
-  "View the file holding the current message."
+  "View the original source of the current message."
   (interactive)
   (let* ((id (notmuch-show-get-message-id))
         (buf (get-buffer-create (concat "*notmuch-raw-" id "*"))))
-    (call-process notmuch-command nil buf nil "show" "--format=raw" id)
+    (let ((coding-system-for-read 'no-conversion))
+      (call-process notmuch-command nil buf nil "show" "--format=raw" id))
     (switch-to-buffer buf)
     (goto-char (point-min))
     (set-buffer-modified-p nil)
index a42a1d202313b4870447db5c7af5309258c1dcfb..3078f9c956a0e1a3423b631ef54a9c1a6ad1980e 100755 (executable)
@@ -128,7 +128,6 @@ EOF
 test_expect_equal_file OUTPUT EXPECTED
 
 test_begin_subtest "8bit text message are not decoded when viewing"
-test_subtest_known_broken
 test_emacs '(notmuch-show "id:test-plain-8bit@example.com")
            (notmuch-show-view-raw-message)
            (test-visible-output "OUTPUT.raw")'