]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
Don't use kill-this-buffer to kill notmuch emacs buffers
[notmuch] / emacs / notmuch-show.el
index 9b3841fffbbbf21233190950b9c11104d762e28a..701212544b51d354e3cb639b8c4e625358714aa2 100644 (file)
@@ -88,7 +88,7 @@ any given message."
      (let ((id (notmuch-show-get-message-id)))
        (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))
          (with-current-buffer buf
-           (call-process notmuch-command nil t nil "cat" id)
+           (call-process notmuch-command nil t nil "show" "--format=raw" id)
            ,@body)
         (kill-buffer buf)))))
 
@@ -555,7 +555,7 @@ function is used. "
 (defvar notmuch-show-mode-map
       (let ((map (make-sparse-keymap)))
        (define-key map "?" 'notmuch-help)
-       (define-key map "q" 'kill-this-buffer)
+       (define-key map "q" 'notmuch-kill-this-buffer)
        (define-key map (kbd "<C-tab>") 'widget-backward)
        (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)
        (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)
@@ -921,7 +921,7 @@ any effects from previous calls to
     (let ((buf (get-buffer-create (concat "*notmuch-raw-" id "*"))))
       (switch-to-buffer buf)
       (save-excursion
-       (call-process notmuch-command nil t nil "cat" id)))))
+       (call-process notmuch-command nil t nil "show" "--format=raw" id)))))
 
 (defun notmuch-show-pipe-message (entire-thread command)
   "Pipe the contents of the current message (or thread) to the given command.
@@ -937,12 +937,13 @@ than only the current message."
   (let (shell-command)
     (if entire-thread
        (setq shell-command 
-             (concat "notmuch show --format=mbox "
+             (concat notmuch-command " show --format=mbox "
                      (shell-quote-argument
                       (mapconcat 'identity (notmuch-show-get-message-ids-for-open-messages) " OR "))
                      " | " command))
       (setq shell-command
-           (concat "notmuch cat " (shell-quote-argument (notmuch-show-get-message-id)) " | " command)))
+           (concat notmuch-command " show --format=raw "
+                   (shell-quote-argument (notmuch-show-get-message-id)) " | " command)))
     (start-process-shell-command "notmuch-pipe-command" "*notmuch-pipe*" shell-command)))
 
 (defun notmuch-show-add-tags-worker (current-tags add-tags)
@@ -1042,7 +1043,7 @@ argument, hide all of the messages."
        until (not (notmuch-show-goto-message-next)))
   ;; Move to the next item in the search results, if any.
   (let ((parent-buffer notmuch-show-parent-buffer))
-    (kill-this-buffer)
+    (notmuch-kill-this-buffer)
     (if parent-buffer
        (progn
          (switch-to-buffer parent-buffer)