-
Notifications
You must be signed in to change notification settings - Fork 200
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
Use complete exception: args-out-of-range #<buffer args_out_of_range.c> 110 124 #860
Comments
I am having a similar issue with you. I also use clangd version 13.0.1. Eglot version d03235f. The error message is something like this.
I tried to dig a bit into the This only affect clangd. |
Can confirm this is not just a bug in eglot, but a bug in the latest build of Emacs, which is 29.0.50. If you pull the A few extra information is that, this bug is probably not related to configuring I have been using Emacs 29.0.50 for a couple of months and the issue just arise in the recent week or two. Maybe the master branch of Emacs introduce some new features or bug fixes that breaks eglot. But I have not been able to track which specifically causes the issue. From my observation, the |
Thanks. This looks like a well-described bug. Will try to look at this later today. |
Based on the descriptions above and the fact that Eglot's CI started to fail 16 days ago, I'm guessing this commit causes the trouble: emacs-mirror/emacs@a8245e1 I might be totally wrong here, but can you, @drshapeless, build an emacs without that commit, and check it the bug persists? (Or if I guessed wrong, can you git-bisect the commit that started to cause the issue?) Thanks. |
I have just built Emacs with commit prior than a8245e1, but the issue persists. The commit was 4 weeks old, a bit older than what I would expect. I remember pulling and building the latest Emacs by the end of February, and had no issues at all. (I may be wrong on the time though.) This is weird. What I would guess is some new features in emacs29 causing the issue, especially the xinput2 and pixel-scrolling-precision related commits. I am trying to locate the commit. But I don't have a lot of free time until weekend. A new discovery is that with company-mode disabled, no errors. The real bug may not be in Emacs itself. But some weird interactions new Emacs and packages. |
Bummer.
There's no need to hurry. I'm guessing the automated tests on github failed because of this issue, so a scripted git-bisect using |
I think a |
I cannot reproduce this. Here's my recipe. I use your
Everything works fine, and I type "book" and I don't get an error. Please clarify exactly what steps trigger the error. |
@joaotavora
|
OK, I can reproduce this, but only with
|
I thought the server must reply with a subset of the client's list of codeActionKind during the initialization. But it's clearly not the case. The typescript-language-server returns these [1]: ["source.fixAll.ts" "source.removeUnused.ts" "source.addMissingImports.ts" ...] The clangd server returns these [2]: ["quickfix" "refactor" "info"] (Additionally, in the current code there is a mismatch between what Eglot initially sent and the completing read arguemnt of eglot-code-actions. "source" and "refactor" is missing from `eglot-code-actions'. Was this intentional?) Now, Eglot plays safe, and offers the union of the two lists as possible completions in `eglot-code-actions'. [1]: #847 (comment) [2]: #860
I was also having this problem, but I chose to re-think my configuration. I ended up switching to vertico, corfu & cape. I get my completions from Eglot via LSP, no problems now. This doesn't resolve this issue, but it is a way out of it. Vertico/Corfu implement the same completion philosophy as Eglot by using supported internals. |
@trev-dev That was a good approach. It kind of confirms that the root of the problem is about newer emacs and company-mode. A side benefit of switching to corfu is that, the performance slightly improve. |
Normally, i would agree with you, since that's where the evidence points to, but from the backtrace, i think the problem is more likely in Eglot itself and a problematic implementation of |
If some of your code depends on the visual column, or characters being "visible", it could conflict with the default overlay-based popup. Using a frontend which is based on child frames (which Corfu is one example of) should fix that, with the obvious downside of not being able to work in a terminal. |
I hadn't thought of this! Vertico takes an out-of-the-way approach to solving this kind of problem. Vertico being made by the same developer as Corfu/Cape. For myself I am not sure if proactive auto-completion is a thing I truly need, or if I truly need it at point, but we're getting much more off-track if I'm allowed to keep babbling about alternatives. https://github.com/minad/vertico#completion-at-point-and-completion-in-region I wonder why child frames are so attractive. The only time I've ever had a performance problem while moving my point as been due to something trying to make a child frame. |
Right, this is more or less my thinking too. But in theory, no, Eglot does not depend on "visible" characters, not that I know of. Does company momentarily insert characters for making its overlay technique? |
Child frames indeed have some performance problems, but that's also dependent on the desktop environment in use (I hear they are more prominent under GNOME Shell than under XFCE, for example), but there are a number of optimizations possible which are included in libs such as posframe. With further improvement worked on, I think. Though of course it would be better to have "native" popups with more optimal performance. Someday.
It used to insert a newline when at eob a number of years ago, but not anymore. So no. But the overlay property |
Interesting. I think yasnippet still does that, I'll check how company solved it later.
Ah, that must be it. Eglot does use current column indeed. Thanks for this hint.
@trev-dev babbling is very much allowed as I do it all the time :), but it could be nice to move this discussion about completion elsewhere (and keep me in the loop, as I have some input there, too) |
Actually, no :-) Eglot doesn't use There's also the fact that Eglot and some old-ish company works fine in Emacs 27.2, but not in current master. Even probably in Emacs 28. So there must have been some regression in Emacs. If you've been following Emacs stuff more closely than I have, then any hint would also be appreciated. Anyway, I can reproduce the problem reliably now, so I should be back with more info soon. |
Yup, so this is the deal. Eglot uses In Emacs 27.2, In Emacs master, this isn't true. It seems to be confounded by the company-mode overlay and moves to eob, which breaks Eglot. Eglot breaks with the latter. I think a defensive fix is in order in Eglot, but this is clearly a regression in Emacs. Pretty please, who has the time/patience to |
Alright, I think I pushed a decent defensive fix, though it doesn't seem to be an Eglot bug . The commit message of that commit has everything to make a decent bug report, I think. I just don't know if this is an Emacs of company-mode bug. @dgutov may have a relevant opinion. Here is the commit message text, for convenience, in case someone wants to copy-paste to a bug report:
|
Please go ahead with the bug report. As I recall, you have a much higher opinion of Debbugs than myself, so it should be natural for you to do this. The scenario should also be easy enough to reproduce without Company, just with a multi-line (?) overlay and the The behavior does sound like a regression, that seems like enough of a justification for me. |
It's just email :-) And I ended up writing the error report in the commit message anyway.
If you can type up that simpler recipe you're envisioning, that'd be very nice indeed, and I'll be happy to attach it to my email. I don't have time, so the current company-specific one it will have to be.
Let's see what people say over at the bug tracker. The current solution is minimally less performant for Eglot, since the bisection algorithm has to search a larger space, but I haven't measured but I wouldn't say much. |
Fine by me. You'd have to do the recipe anyway because you know which kind of code has to misbehave with it. I only suggested circumstances as a rough guess, but step one would be to verify the problem in those circumstances. |
So do you :-) It's |
Again, I'm not sure about your assumptions. (insert "aaaabbbb\nccccdddd")
(setq o (make-overlay 10 14))
(overlay-put o 'invisible t)
(move-to-column 4) Is that misbehavior? |
I'm not seeing the difference in behavior between 29 and 27 here. |
If it doesn't do the same on Emacs master than it did on 27.2, yes. Else no. |
OK, let's see how the bug report fares. |
So you're not seeing the regression then, and a slightly more complex recipe needs to be tried. |
Eglot does a narrowing to the line trying to move to column, maybe that matters. |
…ent Emacs * eglot.el (eglot-lsp-abiding-column): Use (min (point) (point-max)) This is a defensive fix for an Emacs/company-mode problem described below. The problem can be reproduced in Eglot before this commit with: ~/Source/Emacs/emacs/src/emacs -Q -f package-initialize -L \ ~/Source/Emacs/company-mode -l company -f global-company-mode -l \ eglot.el ~/tmp/issue-860/args_out_of_range.c -f eglot -f \ display-line-numbers-mode -f toggle-debug-on-error 1 // args_out_of_range.c 2 struct Book { 3 int id; 4 char title[50] 5 } book = { 1024, "C" }; 6 7 int main(int argc, char *argv[]) 8 { 9 10 // Error when typing the dot to make "book." 11 book 12 return 0; 13 } When one types the dot after the "book" on line 11, company-mode displays a two-line overlay that visually encompasses line 12 after "book", which has the "return 0;" statement. That line happens to also hold a warning about incorrect syntax, one that starts at column 2. Eglot uses 'move-to-column' to go that precise place. In Emacs 27.2, move-to-column is unaffected by previous company-mode overlays, even if the current line is being co-used visually by the overlay. It moves to the right buffer position. In Emacs master, this isn't true. It seems to be confounded by the company-mode overlay and moves to eob, which eventually breaks Eglot with a backtrace such as this one: Debugger entered--Lisp error: (args-out-of-range https://github.com/joaotavora/eglot/issues/<buffer args_out_of_range.c> 110 124) encode-coding-region(110 124 utf-16 t) (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) (/ (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) 2) eglot-lsp-abiding-column(110) (- column (eglot-lsp-abiding-column lbp)) (setq diff (- column (eglot-lsp-abiding-column lbp))) (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil) (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil)) (save-restriction (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if ... ... ...) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil))) eglot-move-to-lsp-abiding-column(2)
…ent Emacs * eglot.el (eglot-lsp-abiding-column): Use (min (point) (point-max)) This is a defensive fix for an Emacs/company-mode problem described below. The problem can be reproduced in Eglot before this commit with: ~/Source/Emacs/emacs/src/emacs -Q -f package-initialize -L \ ~/Source/Emacs/company-mode -l company -f global-company-mode -l \ eglot.el ~/tmp/issue-860/args_out_of_range.c -f eglot -f \ display-line-numbers-mode -f toggle-debug-on-error 1 // args_out_of_range.c 2 struct Book { 3 int id; 4 char title[50] 5 } book = { 1024, "C" }; 6 7 int main(int argc, char *argv[]) 8 { 9 10 // Error when typing the dot to make "book." 11 book 12 return 0; 13 } When one types the dot after the "book" on line 11, company-mode displays a two-line overlay that visually encompasses line 12 after "book", which has the "return 0;" statement. That line happens to also hold a warning about incorrect syntax, one that starts at column 2. Eglot uses 'move-to-column' to go that precise place. In Emacs 27.2, move-to-column is unaffected by previous company-mode overlays, even if the current line is being co-used visually by the overlay. It moves to the right buffer position. In Emacs master, this isn't true. It seems to be confounded by the company-mode overlay and moves to eob, which eventually breaks Eglot with a backtrace such as this one: Debugger entered--Lisp error: (args-out-of-range https://github.com/joaotavora/eglot/issues/<buffer args_out_of_range.c> 110 124) encode-coding-region(110 124 utf-16 t) (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) (/ (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) 2) eglot-lsp-abiding-column(110) (- column (eglot-lsp-abiding-column lbp)) (setq diff (- column (eglot-lsp-abiding-column lbp))) (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil) (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil)) (save-restriction (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if ... ... ...) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil))) eglot-move-to-lsp-abiding-column(2)
* eglot.el (eglot-lsp-abiding-column): Use (min (point) (point-max)) This is a defensive fix for an Emacs/company-mode problem described below. The problem can be reproduced in Eglot before this commit with: ~/Source/Emacs/emacs/src/emacs -Q -f package-initialize -L \ ~/Source/Emacs/company-mode -l company -f global-company-mode -l \ eglot.el ~/tmp/issue-860/args_out_of_range.c -f eglot -f \ display-line-numbers-mode -f toggle-debug-on-error 1 // args_out_of_range.c 2 struct Book { 3 int id; 4 char title[50] 5 } book = { 1024, "C" }; 6 7 int main(int argc, char *argv[]) 8 { 9 10 // Error when typing the dot to make "book." 11 book 12 return 0; 13 } When one types the dot after the "book" on line 11, company-mode displays a two-line overlay that visually encompasses line 12 after "book", which has the "return 0;" statement. That line happens to also hold a warning about incorrect syntax, one that starts at column 2. Eglot uses 'move-to-column' to go that precise place. In Emacs 27.2, move-to-column is unaffected by previous company-mode overlays, even if the current line is being co-used visually by the overlay. It moves to the right buffer position. In Emacs master, this isn't true. It seems to be confounded by the company-mode overlay and moves to eob, which eventually breaks Eglot with a backtrace such as this one: Debugger entered--Lisp error: (args-out-of-range #<buffer args_out_of_range.c> 110 124) encode-coding-region(110 124 utf-16 t) (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) (/ (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) 2) eglot-lsp-abiding-column(110) (- column (eglot-lsp-abiding-column lbp)) (setq diff (- column (eglot-lsp-abiding-column lbp))) (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil) (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil)) (save-restriction (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if ... ... ...) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil))) eglot-move-to-lsp-abiding-column(2) #860: joaotavora/eglot#860
* eglot.el (eglot-lsp-abiding-column): Use (min (point) (point-max)) This is a defensive fix for an Emacs/company-mode problem described below. The problem can be reproduced in Eglot before this commit with: ~/Source/Emacs/emacs/src/emacs -Q -f package-initialize -L \ ~/Source/Emacs/company-mode -l company -f global-company-mode -l \ eglot.el ~/tmp/issue-860/args_out_of_range.c -f eglot -f \ display-line-numbers-mode -f toggle-debug-on-error 1 // args_out_of_range.c 2 struct Book { 3 int id; 4 char title[50] 5 } book = { 1024, "C" }; 6 7 int main(int argc, char *argv[]) 8 { 9 10 // Error when typing the dot to make "book." 11 book 12 return 0; 13 } When one types the dot after the "book" on line 11, company-mode displays a two-line overlay that visually encompasses line 12 after "book", which has the "return 0;" statement. That line happens to also hold a warning about incorrect syntax, one that starts at column 2. Eglot uses 'move-to-column' to go that precise place. In Emacs 27.2, move-to-column is unaffected by previous company-mode overlays, even if the current line is being co-used visually by the overlay. It moves to the right buffer position. In Emacs master, this isn't true. It seems to be confounded by the company-mode overlay and moves to eob, which eventually breaks Eglot with a backtrace such as this one: Debugger entered--Lisp error: (args-out-of-range #<buffer args_out_of_range.c> 110 124) encode-coding-region(110 124 utf-16 t) (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) (/ (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) 2) eglot-lsp-abiding-column(110) (- column (eglot-lsp-abiding-column lbp)) (setq diff (- column (eglot-lsp-abiding-column lbp))) (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil) (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil)) (save-restriction (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if ... ... ...) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil))) eglot-move-to-lsp-abiding-column(2) GitHub-reference: fix joaotavora/eglot#860
* eglot.el (eglot-lsp-abiding-column): Use (min (point) (point-max)) This is a defensive fix for an Emacs/company-mode problem described below. The problem can be reproduced in Eglot before this commit with: ~/Source/Emacs/emacs/src/emacs -Q -f package-initialize -L \ ~/Source/Emacs/company-mode -l company -f global-company-mode -l \ eglot.el ~/tmp/issue-860/args_out_of_range.c -f eglot -f \ display-line-numbers-mode -f toggle-debug-on-error 1 // args_out_of_range.c 2 struct Book { 3 int id; 4 char title[50] 5 } book = { 1024, "C" }; 6 7 int main(int argc, char *argv[]) 8 { 9 10 // Error when typing the dot to make "book." 11 book 12 return 0; 13 } When one types the dot after the "book" on line 11, company-mode displays a two-line overlay that visually encompasses line 12 after "book", which has the "return 0;" statement. That line happens to also hold a warning about incorrect syntax, one that starts at column 2. Eglot uses 'move-to-column' to go that precise place. In Emacs 27.2, move-to-column is unaffected by previous company-mode overlays, even if the current line is being co-used visually by the overlay. It moves to the right buffer position. In Emacs master, this isn't true. It seems to be confounded by the company-mode overlay and moves to eob, which eventually breaks Eglot with a backtrace such as this one: Debugger entered--Lisp error: (args-out-of-range #<buffer args_out_of_range.c> 110 124) encode-coding-region(110 124 utf-16 t) (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) (/ (- (length (encode-coding-region (or lbp (line-beginning-position)) (point) 'utf-16 t)) 2) 2) eglot-lsp-abiding-column(110) (- column (eglot-lsp-abiding-column lbp)) (setq diff (- column (eglot-lsp-abiding-column lbp))) (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil) (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil)) (save-restriction (catch '--cl-block-nil-- (let* ((lbp (line-beginning-position)) (diff nil) (--cl-var-- t)) (narrow-to-region lbp (line-end-position)) (move-to-column column) (while (progn (setq diff (- column (eglot-lsp-abiding-column lbp))) (not (= 0 diff))) (condition-case eob-err (forward-char (/ (if ... ... ...) 2)) (end-of-buffer (throw '--cl-block-nil-- eob-err))) (setq --cl-var-- nil)) nil))) eglot-move-to-lsp-abiding-column(2) GitHub-reference: fix joaotavora/eglot#860
LSP transcript - M-x eglot-events-buffer (mandatory unless Emacs inoperable)
Backtrace (mandatory, unless no error message seen or heard):
Minimal configuration (mandatory)
# Type this in a shell to start an Emacs with Eglot configured $ emacs -Q -l eglot-start.el
The text was updated successfully, but these errors were encountered: