-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corfu-popupinfo error with newly released eglot-1.14 #314
Comments
Can you please provide a stack trace? |
oddly enough I don't get one, even with debug-on-error enabled. |
Thought I had done something wrong with my config and was experiencing this issue alone. You could also strip away most configs and retain the popupinfo setting + try rustic mode for the error to show up. No stack trace though... |
I also tried https://github.com/minad/corfu#debugging-corfu but still no stack trace. |
I cannot reproduce this issue on Emacs 29.0.60 with the newest Corfu and Eglot 1.14 using Clangd. Please provide a more detailed recipe or try to narrow the issue more precisely. This might not be a Corfu issue since Corfu has worked well before, and it still works in my test. |
I will try to get a full repro tomorrow. One of my tests was with eglot and clojure-lsp. I didn't upgrade clojure-lsp, only eglot and corfu. |
Very good. But please note that I cannot test arbitrary servers, since this exceeds my bandwidth. My suspicion is that the issue might have something to do with the Markdown conversion. I've seen there have been some recent changes related to that. I believe @jdtsmith contributed something there. Maybe he has some more insight regarding this problem. |
That should be easy to test, iirc it's possible to turn this off in eglot. I will let you know. |
The only markdown change I was involved with was the addition of |
I got a somewhat contained repro here: https://gist.github.com/mpenet/bdd591bd005f721b9abdc8953493cf24 The comment here https://gist.github.com/mpenet/bdd591bd005f721b9abdc8953493cf24?permalink_comment_id=4527589#gistcomment-4527589 tells what to do to get it running. |
@mpenet Thanks. This goes a bit beyond what I am able to debug with reasonable effort due the various dependencies. |
Actually one of the dependencies is not needed I think, only clojure-lsp should be necessary (it’s a native binary) |
The named call will arrive via a timer, not a post-command-hook, so maybe you should debug |
Also, I managed to reproduce the issue only with the following config: Requirements:
(package-initialize)
;; Tab bindings are not necessary for reproducing the error..
(use-package corfu
:bind (:map corfu-map
("TAB" . corfu-next)
([tab] . corfu-next)
("S-TAB" . corfu-previous)
([backtab] . corfu-previous))
:init (global-corfu-mode)
:custom (corfu-auto t))
(use-package corfu-popupinfo
:ensure nil
:hook (corfu-mode . corfu-popupinfo-mode)
:custom (corfu-popupinfo-delay '(0.5 . 0.2)))
(use-package rustic
:mode ("\\.rs$" . rustic-mode)
:custom (rustic-lsp-client 'eglot)) |
@jdtsmith I tried executing the following keybinding |
with edebug inside corfu-popupinfo--show at the cancel-timer call I don't get a stacktrace/error. And the read-only buffer error I get without debuging doesn't show when instrumented.
backtraces
I am not very familiar with edebug so I might miss the obvious. corfu-info-documentation doesn't work anymore as well
|
fyi I opened an issue on eglot to see if they have some insight on what could be causing this. |
Just tried 1.14 here and no issue with popupinfo (with pyright).
Hmmm. And once you C-M-x the error returns? You can test my theory by adding an (let* ((cand-changed
(not (and (corfu-popupinfo--visible-p)
(equal candidate corfu-popupinfo--candidate))))
(new-coords (frame-edges corfu--frame 'inner-edges))
(coords-changed (not (equal new-coords corfu-popupinfo--coordinates)))
(inhibit-read-only t))
... |
There's a more minimal repro in the eglot discussion joaotavora/eglot#1202 (reply in thread) |
The problem indeed goes away with this change. |
So that would indicate that for whatever reason, the latest eglot accidentally sets the hidden popupinfo buffer to read-only at some point (but only for your specific LSP server). It probably wouldn't be harmful for corfu to include a defensive shield of this sort, but it's more of a bandaid than a cure. |
Hi,
eglot-1.14 was released yesterday, I gave it a try today and corfu-popupinfo now returns an error instead of showing the docs.
I confirmed it's linked to eglot+corfu-popupinfo, if I revert eglot everything is fine, same if I disable corfu-popupinfo. It also works fine on non-eglot enabled buffers.
The error:
recent eglot commits: https://github.com/emacs-mirror/emacs/commits/master/lisp/progmodes/eglot.el
My setup:
GNU Emacs 29.0.60 (build 1, aarch64-apple-darwin22.1.0, NS appkit-2299.00 Version 13.0.1 (Build 22A400)) of 2022-12-07
The text was updated successfully, but these errors were encountered: