From 4771f2f6850cc5c2402e0f88ae85a29ab1d76709 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 17 Sep 2018 10:00:16 +0100 Subject: [PATCH] Don't block kill-buffer-hook if server somehow hangs * eglot.el (eglot--signal-textDocument/didClose): Use with-demoted-errors. GitHub-reference: close https://github.com/joaotavora/eglot/issues/115 --- lisp/progmodes/eglot.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 1a702543b96..959cc5d1b8d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1223,9 +1223,11 @@ When called interactively, use the currently active server" (defun eglot--signal-textDocument/didClose () "Send textDocument/didClose to server." - (jsonrpc-notify - (eglot--current-server-or-lose) - :textDocument/didClose `(:textDocument ,(eglot--TextDocumentIdentifier)))) + (with-demoted-errors + "[eglot] error sending textDocument/didClose: %s" + (jsonrpc-notify + (eglot--current-server-or-lose) + :textDocument/didClose `(:textDocument ,(eglot--TextDocumentIdentifier))))) (defun eglot--signal-textDocument/willSave () "Send textDocument/willSave to server." -- 2.39.2