]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: notmuch-show-pipe-message: cosmetics
authorJonas Bernoulli <jonas@bernoul.li>
Mon, 19 Jul 2021 11:31:08 +0000 (13:31 +0200)
committerDavid Bremner <david@tethera.net>
Mon, 30 Aug 2021 00:51:30 +0000 (17:51 -0700)
emacs/notmuch-show.el

index 0f96c4fe9f7074d36b90e475b2790885ea437aac..dc004b17f6666d45173185b7e851fc1b6399d69e 100644 (file)
@@ -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.