emacs: notmuch-show-pipe-message: cosmetics

This commit is contained in:
Jonas Bernoulli 2021-07-19 13:31:08 +02:00 committed by David Bremner
parent 01298a8437
commit 3a6e4f9768

View file

@ -2078,19 +2078,19 @@ message."
(let ((cwd default-directory) (let ((cwd default-directory)
(buf (get-buffer-create (concat "*notmuch-pipe*")))) (buf (get-buffer-create (concat "*notmuch-pipe*"))))
(with-current-buffer buf (with-current-buffer buf
(setq buffer-read-only nil) (setq buffer-read-only t)
(erase-buffer) (let ((inhibit-read-only t))
;; Use the originating buffer's working directory instead of (erase-buffer)
;; that of the pipe buffer. ;; Use the originating buffer's working directory instead of
(cd cwd) ;; that of the pipe buffer.
(let ((exit-code (call-process-shell-command shell-command nil buf))) (cd cwd)
(goto-char (point-max)) (let ((exit-code (call-process-shell-command shell-command nil buf)))
(set-buffer-modified-p nil) (goto-char (point-max))
(setq buffer-read-only t) (set-buffer-modified-p nil)
(unless (zerop exit-code) (unless (zerop exit-code)
(pop-to-buffer buf) (pop-to-buffer buf)
(message (format "Command '%s' exited abnormally with code %d" (message (format "Command '%s' exited abnormally with code %d"
shell-command exit-code)))))))) shell-command exit-code)))))))))
(defun notmuch-show-tag-message (&rest tag-changes) (defun notmuch-show-tag-message (&rest tag-changes)
"Change tags for the current message. "Change tags for the current message.