From: Jonas Bernoulli Date: Mon, 19 Jul 2021 11:31:08 +0000 (+0200) Subject: emacs: notmuch-show-pipe-message: cosmetics X-Git-Tag: archive/debian/0.34_rc0-1~73 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=3a6e4f97689d6636eedce32fe3d43fe1357246b9 emacs: notmuch-show-pipe-message: cosmetics --- diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 0f96c4fe..dc004b17 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -2078,19 +2078,19 @@ message." (let ((cwd default-directory) (buf (get-buffer-create (concat "*notmuch-pipe*")))) (with-current-buffer buf - (setq buffer-read-only nil) - (erase-buffer) - ;; Use the originating buffer's working directory instead of - ;; that of the pipe buffer. - (cd cwd) - (let ((exit-code (call-process-shell-command shell-command nil buf))) - (goto-char (point-max)) - (set-buffer-modified-p nil) - (setq buffer-read-only t) - (unless (zerop exit-code) - (pop-to-buffer buf) - (message (format "Command '%s' exited abnormally with code %d" - shell-command exit-code)))))))) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (erase-buffer) + ;; Use the originating buffer's working directory instead of + ;; that of the pipe buffer. + (cd cwd) + (let ((exit-code (call-process-shell-command shell-command nil buf))) + (goto-char (point-max)) + (set-buffer-modified-p nil) + (unless (zerop exit-code) + (pop-to-buffer buf) + (message (format "Command '%s' exited abnormally with code %d" + shell-command exit-code))))))))) (defun notmuch-show-tag-message (&rest tag-changes) "Change tags for the current message.