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

Don't display flymake annotations when flymake is disabled #472

Conversation

dandavison
Copy link
Contributor

@dandavison dandavison commented May 12, 2020

Fixes #468.

To reproduce this bug on master:

  1. Create some buffer state that causes a flymake error/warning diagnostic to be displayed
  2. Disable flymake mode with M-x flymake-mode. You will see the flymake overlay annotations disappear.
  3. Do some activity in the buffer that triggers eglot diagnostic checking, such as inserting a newline. You will see the flymake overlay annotations reappear. This is a bug: they should only be displayed when flymake mode is active.

…disabled

* eglot.el (eglot-handle-notification): Check that flymake-mode is
  active before calling flymake report function.
@@ -1580,7 +1580,7 @@ COMMAND is a symbol naming the command."
(t 'eglot-note))
message `((eglot-lsp-diag . ,diag-spec)))))
into diags
finally (cond (eglot--current-flymake-report-fn
finally (cond ((and flymake-mode eglot--current-flymake-report-fn)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we don't want to still set the "outstanding diagnostics" to nil. In this case. Not sure.

Other than that, looks good and simple.

@joaotavora joaotavora merged commit da7ff48 into joaotavora:master May 12, 2020
bhankas pushed a commit to bhankas/emacs that referenced this pull request Sep 18, 2022
…ke is disabled

Also fix joaotavora/eglot#472.

Copyright-paperwork-exempt: yes

* eglot.el (eglot-handle-notification): Check that flymake-mode is
  active before calling flymake report function.
bhankas pushed a commit to bhankas/emacs that referenced this pull request Sep 19, 2022
…ke is disabled

Also fix joaotavora/eglot#472.

Copyright-paperwork-exempt: yes

* eglot.el (eglot-handle-notification): Check that flymake-mode is
  active before calling flymake report function.
bhankas pushed a commit to bhankas/emacs that referenced this pull request Sep 19, 2022
Also fix #472.

Copyright-paperwork-exempt: yes

* eglot.el (eglot-handle-notification): Check that flymake-mode is
  active before calling flymake report function.
#468: joaotavora/eglot#468
#472: joaotavora/eglot#472
jollaitbot pushed a commit to sailfishos-mirror/emacs that referenced this pull request Oct 12, 2022
Also fix joaotavora/eglot#472.

Copyright-paperwork-exempt: yes

* eglot.el (eglot-handle-notification): Check that flymake-mode is
  active before calling flymake report function.

GitHub-reference: fix joaotavora/eglot#468
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.

How to temporarily silence flymake?
2 participants