mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
emacs: notmuch-start-notmuch: avoid storing process buffer twice
The buffer of the error process is accessible using `process-buffer'. We still have to store the error-buffer in the non-error process because for that process `process-buffer' obviously returns its own buffer.
This commit is contained in:
parent
db0fd8e782
commit
778950872d
1 changed files with 2 additions and 3 deletions
|
@ -906,12 +906,11 @@ status."
|
||||||
:connection-type 'pipe
|
:connection-type 'pipe
|
||||||
:stderr err-buffer))
|
:stderr err-buffer))
|
||||||
(err-proc (get-buffer-process err-buffer)))
|
(err-proc (get-buffer-process err-buffer)))
|
||||||
(process-put err-proc 'err-buffer err-buffer)
|
|
||||||
(set-process-sentinel err-proc #'notmuch-start-notmuch-error-sentinel)
|
|
||||||
(process-put proc 'err-buffer err-buffer)
|
(process-put proc 'err-buffer err-buffer)
|
||||||
(process-put proc 'sub-sentinel sentinel)
|
(process-put proc 'sub-sentinel sentinel)
|
||||||
(process-put proc 'real-command (cons notmuch-command args))
|
(process-put proc 'real-command (cons notmuch-command args))
|
||||||
(set-process-sentinel proc #'notmuch-start-notmuch-sentinel)
|
(set-process-sentinel proc #'notmuch-start-notmuch-sentinel)
|
||||||
|
(set-process-sentinel err-proc #'notmuch-start-notmuch-error-sentinel)
|
||||||
proc))
|
proc))
|
||||||
|
|
||||||
(defun notmuch-start-notmuch-sentinel (proc event)
|
(defun notmuch-start-notmuch-sentinel (proc event)
|
||||||
|
@ -956,7 +955,7 @@ status."
|
||||||
(message "%s" (error-message-string err))))))
|
(message "%s" (error-message-string err))))))
|
||||||
|
|
||||||
(defun notmuch-start-notmuch-error-sentinel (proc event)
|
(defun notmuch-start-notmuch-error-sentinel (proc event)
|
||||||
(let ((buffer (process-get proc 'err-buffer)))
|
(let ((buffer (process-buffer proc)))
|
||||||
(when (buffer-live-p buffer)
|
(when (buffer-live-p buffer)
|
||||||
(kill-buffer buffer))))
|
(kill-buffer buffer))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue