Closed 50ways2sayhard closed 2 weeks ago
This might be a relevant issue, but when you try to kill an eglot buffer while having doom-modeline installed you wind up with cl-no-applicable-method: No applicable method: jsonrpc-name, nil
. Disabling the modeline does not resolve the issue, but removing it and restarting Emacs seems to get rid of the issue.
Toggling debug-on-error yields:
Debugger entered--Lisp error: (cl-no-applicable-method jsonrpc-name nil)
signal(cl-no-applicable-method (jsonrpc-name nil))
cl-no-applicable-method(#s(cl--generic :name jsonrpc-name :dispatches ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x1dc2c94fcb654fb5>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode 0x111a2082463a1535>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x1a05678245d32db5>)))) :method-table (#s(cl--generic-method :specializers (jsonrpc-connection) :qualifiers nil :call-con nil :function #f(compiled-function (this) "Retrieve the slot `name' from an object of class `jsonrpc-connection'." #<bytecode 0x1bf1fe593d747058>))) :options nil) nil)
apply(cl-no-applicable-method #s(cl--generic :name jsonrpc-name :dispatches ((0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x1dc2c94fcb654fb5>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode 0x111a2082463a1535>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x1a05678245d32db5>)))) :method-table (#s(cl--generic-method :specializers (jsonrpc-connection) :qualifiers nil :call-con nil :function #f(compiled-function (this) "Retrieve the slot `name' from an object of class `jsonrpc-connection'." #<bytecode 0x1bf1fe593d747058>))) :options nil) nil)
#f(compiled-function (&rest args) #<bytecode 0x3e64832ef2e7082>)(nil)
apply(#f(compiled-function (&rest args) #<bytecode 0x3e64832ef2e7082>) nil nil)
jsonrpc-name(nil)
doom-modeline-update-eglot()
run-hooks(eglot-managed-mode-hook)
eglot--managed-mode(-1)
eglot--managed-mode-off()
kill-buffer("linked-lists.py")
funcall-interactively(kill-buffer "linked-lists.py")
command-execute(kill-buffer)
I had the same issue, I applied the following patch and it seems to work.
diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el
index 3a65892..00ff92b 100644
--- a/doom-modeline-segments.el
+++ b/doom-modeline-segments.el
@@ -2058,8 +2058,8 @@ mouse-1: Reload to start server")
(nick 'doom-modeline-lsp-success)
(t 'doom-modeline-lsp-warning)))
(server-info (and server (eglot--server-info server)))
- (server-name (or (plist-get server-info :name)
- (jsonrpc-name server) ""))
+ (server-name (and server (or (plist-get server-info :name)
+ (jsonrpc-name server) "")))
(major-modes (or (and server-info (eglot--major-modes server)) ""))
(icon (doom-modeline-lsp-icon eglot-menu-string face)))
(propertize icon
Can confirm that it also resolved the issue for me. Thanks a lot for resolving the issue and sharing the solution with us! :)
Thank you for the bug report
doom-modeline
related packages.emacs -Q
.Bug description
Emacs throws an error in the process sentinel:
No applicable method: jsonrpc-name, nil
after runningM-x eglot-shutdown
when using the newestdoom-modeline
. When I switch to version36e32f0
, everything works fine and no error is thrown.My Emacs version is: GNU Emacs 30.0.90 (build 1, aarch64-apple-darwin23.5.0, NS appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-09-02
Steps to reproduce
Expected behavior
Executing eglot-shutdown with no error thrown.
OS
MacOS
Emacs Version
30 (gccemacs)
Emacs Configurations
No response
Error callstack
No response
Anything else
No response