Skip to content
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 display-warning to print indent warnings #212

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

blahgeek
Copy link
Contributor

See comments in #191

@zerolfx zerolfx merged commit e24c165 into copilot-emacs:main Dec 17, 2023
@fgiasson
Copy link

What was the reason to remove copilot-indent-warning-suppress?

In my current setup, I am getting warning messages every time that I type something while being in copilot-mode. Is there a new way to suppress them? (can't see from this PR)

@fgiasson
Copy link

For the ones experiencing this issue, you can always install up to the previous commit until this is resolved (in Spacemacs):

(copilot :location (recipe
                               :fetcher github
                               :repo "zerolfx/copilot.el"
                               :commit "ba1d6018fdc2d735fecab1b2dcd4b5ea121b05ac"
                               :files ("*.el" "dist")))

@Ramblurr
Copy link

Ramblurr commented Dec 19, 2023

image

This new warning that is displayed upon every keypress is rather frustrating.

  1. It is displayed on every keypress
  2. It does not contain (nor the docs here on github) any actionable instructions

This renders copilot.el effectively useless and the warning is basically a fatal error because I can't use emacs with it enabled.

If its just a warning (i.e., a non fatal error that can be ignored) it shouldn't display on every keystroke. It should display once and then get out of my way.

If it is an error, then make it clear that something is wrong and copilot.el cannot be used in the current state.

Ideally in either case there would be some actionable advice or documentation about how to resolve the warning/error.

@blahgeek
Copy link
Contributor Author

blahgeek commented Dec 19, 2023

@Ramblurr sorry for the inconvenience. Printing the warning on each keystroke is not expected, I will fix it ASAP (update: fixed: #215).

To suppress the warning, execute (add-to-list 'warning-suppress-types '(copilot copilot-no-mode-indent)) (or to suppress all warnings from copilot, (add-to-list 'warning-suppress-types 'copilot)). Pressing "enter" on the *Warnings* buffer should prompt you to do so.

@Ramblurr
Copy link

Thanks @blahgeek I appreciate the response.

Aside from suppressing the warning is there a proper way to fix the problem (which I don't fully understand tbh)?

@blahgeek
Copy link
Contributor Author

Well, according to the code, it warns because current major mode's indentation cannot be found in neither copilot--indentation-alist or editorconfig-indentation-alist. Adding corresponding entries to them should be able to fix it.

More details in #179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants