-
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
introduction of less intrusive eglot--user-error #1054
base: master
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc string removed.
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-error
is prefered overeglot--error
, which could be of annoyance whendebug-on-error
is set to non-nil value:A relevant unhandle
nil
case ineglot-code-actions
(eglot--dcase
) when invoked as mouse buffer menuAdditionally, the "didn't match any of the commands" comes from
eglot--dcase
which this specific one comes fromeglot-code-actions
is 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
nil
case, 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
...