[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67480: 30.0.50; Cannot start eglot
From: |
Stefan Monnier |
Subject: |
bug#67480: 30.0.50; Cannot start eglot |
Date: |
Tue, 28 Nov 2023 09:52:27 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> 1. `emacs -Q`
> 2. Open a src file and `M-x eglot`
> 3. Get the following message:
[...]
> Loading external-completion (native compiled elisp)...done
> Unbound slot: eglot-lsp-server, "#<eglot-lsp-server
> eglot-lsp-server-1feea1d8dd60>", -events-buffer, oref
> error in process filter: Unbound slot: eglot-lsp-server,
> "#<eglot-lsp-server eglot-lsp-server-1feea1d8dd60>", -events-buffer, oref
> [2 times]
> ```
[...]
> After I tried to build different version, I can confirm the problem
> occurs after this commit:
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6c47931a1ad4de4af3f147b9604169c2441100fe
Thanks, that was very helpful. This commit makes it so `:accessor`
functions behave like `:reader` functions, i.e. behave like
`slot-value`, whereas the old code returned nil if the slot was
"unbound".
Maybe the better fix is something like the patch below?
João?
Stefan
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el
index 52ffb220d8b..4298d75c5bf 100644
--- a/lisp/jsonrpc.el
+++ b/lisp/jsonrpc.el
@@ -71,6 +71,7 @@ jsonrpc-connection
:accessor jsonrpc--request-continuations
:documentation "A hash table of request ID to continuation lambdas.")
(-events-buffer
+ :initform nil
:accessor jsonrpc--events-buffer
:documentation "A buffer pretty-printing the JSONRPC events")
(-events-buffer-scrollback-size