aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch-lib.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-01-10 15:00:45 +0100
committerDavid Bremner <david@tethera.net>2021-01-13 07:08:13 -0400
commitadc123e4fd6384fba0165ebddc99d4323f6bee73 (patch)
tree1128b2ebac960f19f96da2463fb65c8b389e2548 /emacs/notmuch-lib.el
parent904ffbc9256db472abd34aa8e683c40067a42dd0 (diff)
emacs: avoid killing process buffer when process is still alive
In practice this probably does not make a difference or we would have heard about it many times, but better be safe than sorry. Process sentinels are called not only when the process has finished but also on other state changes.
Diffstat (limited to 'emacs/notmuch-lib.el')
-rw-r--r--emacs/notmuch-lib.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index e09912d3..0e235fa3 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -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)