X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=3a60d4308470c5643975741d21912c4ac49d89bc;hb=75d616c6caa0e0ac51c34371ebee7574dbea2952;hp=3a394d0f385a8468e64231b9b006595d7c43bcc5;hpb=e845f4e27e67208c95def4ee2601568b8d81a12e;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 3a394d0f..3a60d430 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -550,6 +550,10 @@ function is used. " ;; Move straight to the first open message (if (not (notmuch-show-message-visible-p)) (notmuch-show-next-open-message)) + + ;; Set the header line to the subject of the first open message. + (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject))) + (notmuch-show-mark-read))) (defvar notmuch-show-stash-map @@ -931,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. @@ -1084,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.