introduction of less intrusive eglot--user-error#1054
introduction of less intrusive eglot--user-error#1054Inc0n wants to merge 3 commits intojoaotavora:masterfrom
Conversation
There are two places where `eglot--user-error' is prefered over `eglot--error', which could be of annoyance when `debug-on-error' is set to non-nil value: - Didn't match any of the commands - No code action
joaotavora
left a comment
There was a problem hiding this comment.
I agree with the need for user-error in that one "code actions" spot. But the other one is wrong in the eglot--dbind util. If you are bumping into errors there, something else is wrong.
By the way, having debug-on-error turned on means you are interested in debugging Elisp program errors with a backtrace. So you shouldn't be surprised when one shows up. I you aren't interested in these backtraces, don't turn on debug-on-error. I only do when I put one my Elisp developer hat, I don't have it on when I have the Emacs user hat on.
|
You should explain clearly the steps that lead to the |
|
Sorry for not explaining them clearly. I will try to formulate them here again, properly like you said. |
|
Steps:
I would consider this as a bug, since invoking the code actions via |
|
After putting on the developer hat on, the culprit should be
|
|
Sorry, for clustering this PR, I was uncertain if the |
Removed redundant doc strings.
I agree and I have reproduced this. I see you have created a new PR. Let's continue this bug there. |
|
Hi there. Just checking on this PR, specifically the "No code actions here" part. I understand that this part of the change is uncontroversial (unlike the "%s didn't match" change, where there's some issue that I haven't fully understood). I generally run with |
This is to address the discussion made in #1053.
Comments
There are two places where
eglot--user-erroris prefered overeglot--error, which could be of annoyance whendebug-on-erroris set to non-nil value:A relevant unhandle
nilcase ineglot-code-actions(eglot--dcase) when invoked as mouse buffer menuAdditionally, the "didn't match any of the commands" comes from
eglot--dcasewhich this specific one comes fromeglot-code-actionsis erroring when none of the code action is selected in the mouse buffer menu, which results in nil and is not part of the case.So in that specific senario, it may be best to handle the
nilcase, however, the solution to that problem would be outside the scope of this commit. But if a solution has been found, I think it would be better to useeglot--error...