X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=3a60d4308470c5643975741d21912c4ac49d89bc;hb=26b4cc4aad93e25dab1e1f38f19f1ae69cde389c;hp=d8773e65d90dbfeff5ad4e8fda91d4d07c402ca5;hpb=128b6259ee327adf9189b81034b3b6962e8b9dbc;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index d8773e65..3a60d430 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -935,11 +935,13 @@ any effects from previous calls to (defun notmuch-show-view-raw-message () "View the file holding the current message." (interactive) - (let ((id (notmuch-show-get-message-id))) - (let ((buf (get-buffer-create (concat "*notmuch-raw-" id "*")))) - (switch-to-buffer buf) - (save-excursion - (call-process notmuch-command nil t nil "show" "--format=raw" id))))) + (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) + (switch-to-buffer buf) + (goto-char (point-min)) + (set-buffer-modified-p nil) + (view-buffer buf 'kill-buffer-if-not-modified))) (defun notmuch-show-pipe-message (entire-thread command) "Pipe the contents of the current message (or thread) to the given command.