]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
Merge branch 'release'
[notmuch] / emacs / notmuch-show.el
index 4dee34bfd9cfb2d6b1ad876884142d48427e1f26..3345878f513caac3c2e58e89905eacd64976e784 100644 (file)
@@ -100,7 +100,7 @@ visible for any given message."
   :group 'notmuch-show
   :group 'notmuch-hooks)
 
-(defcustom notmuch-show-max-text-part-size 10000
+(defcustom notmuch-show-max-text-part-size 100000
   "Maximum size of a text part to be shown by default in characters.
 
 Set to 0 to show the part regardless of size."
@@ -353,8 +353,6 @@ operation on the contents of the current buffer."
                'message-header-cc)
               ((looking-at "[Ss]ubject:")
                'message-header-subject)
-              ((looking-at "[Ff]rom:")
-               'message-header-from)
               (t
                'message-header-other))))
 
@@ -1880,12 +1878,15 @@ to show, nil otherwise."
   "View the original source of the current message."
   (interactive)
   (let* ((id (notmuch-show-get-message-id))
-        (buf (get-buffer-create (concat "*notmuch-raw-" id "*"))))
-    (let ((coding-system-for-read 'no-conversion))
-      (call-process notmuch-command nil buf nil "show" "--format=raw" id))
+        (buf (get-buffer-create (concat "*notmuch-raw-" id "*")))
+        (inhibit-read-only t))
     (switch-to-buffer buf)
+    (erase-buffer)
+    (let ((coding-system-for-read 'no-conversion))
+      (call-process notmuch-command nil t nil "show" "--format=raw" id))
     (goto-char (point-min))
     (set-buffer-modified-p nil)
+    (setq buffer-read-only t)
     (view-buffer buf 'kill-buffer-if-not-modified)))
 
 (put 'notmuch-show-pipe-message 'notmuch-doc