From: Evgeni Kolev Date: Thu, 10 Nov 2022 17:17:44 +0000 (+0000) Subject: Ignore errors when shutting down all LSP servers (bug#59146) X-Git-Tag: emacs-29.0.90~1616^2~208^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c833b291f57e61613cbf09cffae478aa02e6ecc5;p=emacs.git Ignore errors when shutting down all LSP servers (bug#59146) eglot-shutdown-all has a bug that results in partially stopping servers: when a server shutdown timeouts (1.5s), an error is propagated and eglot-shutdown-all does not try to shutdown the rest of the servers. * eglot.el (eglot-shutdown-all): Ignore errors when shutting down servers, converting errors to messages. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index f69d392b463..7fa4bd380ca 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -877,7 +877,8 @@ SERVER." PRESERVE-BUFFERS as in `eglot-shutdown', which see." (interactive (list current-prefix-arg)) (cl-loop for ss being the hash-values of eglot--servers-by-project - do (cl-loop for s in ss do (eglot-shutdown s nil nil preserve-buffers)))) + do (with-demoted-errors "[eglot] shutdown all: %s" + (cl-loop for s in ss do (eglot-shutdown s nil nil preserve-buffers))))) (defun eglot--on-shutdown (server) "Called by jsonrpc.el when SERVER is already dead."