X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=3a60d4308470c5643975741d21912c4ac49d89bc;hb=3863e88e965f37e316de90978071c985fb4e5701;hp=0d3c4c2789d80043af36dac4dd598609ab898bde;hpb=c471c4eb0488ee689ab96814e3879930bec32bc6;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 0d3c4c27..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. @@ -1088,49 +1090,45 @@ buffer." (interactive) (notmuch-show-archive-thread-internal nil)) -(defun notmuch-show-do-stash (text) - (kill-new text) - (message "Saved: %s" text)) - (defun notmuch-show-stash-cc () "Copy CC field of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-cc))) + (notmuch-common-do-stash (notmuch-show-get-cc))) (defun notmuch-show-stash-date () "Copy date of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-date))) + (notmuch-common-do-stash (notmuch-show-get-date))) (defun notmuch-show-stash-filename () "Copy filename of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-filename))) + (notmuch-common-do-stash (notmuch-show-get-filename))) (defun notmuch-show-stash-from () "Copy From address of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-from))) + (notmuch-common-do-stash (notmuch-show-get-from))) (defun notmuch-show-stash-message-id () "Copy message ID of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-message-id))) + (notmuch-common-do-stash (notmuch-show-get-message-id))) (defun notmuch-show-stash-subject () "Copy Subject field of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-subject))) + (notmuch-common-do-stash (notmuch-show-get-subject))) (defun notmuch-show-stash-tags () "Copy tags of current message to kill-ring as a comma separated list." (interactive) - (notmuch-show-do-stash (mapconcat 'identity (notmuch-show-get-tags) ","))) + (notmuch-common-do-stash (mapconcat 'identity (notmuch-show-get-tags) ","))) (defun notmuch-show-stash-to () "Copy To address of current message to kill-ring." (interactive) - (notmuch-show-do-stash (notmuch-show-get-to))) + (notmuch-common-do-stash (notmuch-show-get-to))) ;; Commands typically bound to buttons.