]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs: avoid killing process buffer when process is still alive
[notmuch] / emacs / notmuch-lib.el
index e09912d3174fbf45f089745e317e8350e0c6f364..0e235fa365412dd0371c20af7b571479dad2361b 100644 (file)
@@ -960,9 +960,10 @@ status."
        (message "%s" (error-message-string err))))))
 
 (defun notmuch-start-notmuch-error-sentinel (proc event)
-  (let ((buffer (process-buffer proc)))
-    (when (buffer-live-p buffer)
-      (kill-buffer buffer))))
+  (unless (process-live-p proc)
+    (let ((buffer (process-buffer proc)))
+      (when (buffer-live-p buffer)
+       (kill-buffer buffer)))))
 
 (defvar-local notmuch-show-process-crypto nil)