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

Disabling backend flymake-proc-legacy-flymake because (error Can’t find a suitable init function) #557

Open
takafusui opened this issue Oct 27, 2020 · 5 comments

Comments

@takafusui
Copy link

Hi,

I know that there are some issues regarding this, for instance, #500, but adding (remove-hook 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake) does not solve the problem.

When I open a python script, Flymake automatically starts, but I find the Disabling backend flymake-proc-legacy-flymake because (error Can’t find a suitable init function) warning in the *Flymake log* buffer.
If I turn on Flymake on *.el, Flymake starts to detect errors...

Could you kindly help me how can I debug this issue?
eglot requires emacs 26.1, but I am now using 26.3 on Ubuntu 20.04. Could it be an issue, but maybe not I guess?

Thank you in advance for your help!

@joaotavora
Copy link
Owner

What is your issue? Does it have anything to do with Eglot? The warning is probably correct and not problematic.

@takafusui
Copy link
Author

Hi,

Yes, you are correct. My issue and naive guess are the followings:
When I open a python script, eglot launches correctly and Flymake starts its process (I can see Flymake[0, 0] in the mode line).
However, it does not report anything when I add an evident error.
When I open, for instance, a *.el script, hit M-x flymake-mode, and add an evident error, it reports an error with ! as usual.
My naive guess is that since flymake is called by eglot, the flymake process is crushed somehow. But of course, maybe I am wrong...

@joaotavora
Copy link
Owner

However, it does not report anything when I add an evident error.

This is the problem here, not anything else. When using Eglot, you don't need to M-x flymake-mode it's automatically done for you.

Can you start from the beginning and tell me step by step what you do? Maybe you can, like the README suggests:

  1. start an Emacs -Q
  2. require (require 'eglot) or maybe just type M-x package-initialize.
  3. go to the python file and type M-x eglot

Does it start correctly? If so, go on and the "evident error". Does it appear?

@takafusui
Copy link
Author

Thank you for your prompt reply.
I start emacs by executing $emacs -Q.
Then (require 'eglot) in the scratch buffer and M-x eval-buffer, but it returns eval-buffer: Cannot open load file: No such file or directory, eglot
If I execute M-x package-initialize, it does not return anything, and when M-x eglo [No match]...

@jooon
Copy link

jooon commented Nov 12, 2020

I had a similar problem right now, but I realized it was my fault. I had reinstalled python-language-server in a new virtualenv and forgotten to add a linter, so eglot was just not receiving any errors or warnings for flymake to highlight. Editing a file in a different language showed that eglot and flymake still worked fine.

To fix it, I installed the package with the extra identifier all like this, which installs all optional plugins:

pip install python-language-server[all]

By default python-language-server package does not depend on any linter. I guess the reason is that it supports so many and they want you to choose and made them all optional.

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

No branches or pull requests

3 participants