* elpy don't syntax check on the fly
@ 2020-10-21 7:48 c.buhtz
2020-10-21 12:24 ` Jean Louis
0 siblings, 1 reply; 2+ messages in thread
From: c.buhtz @ 2020-10-21 7:48 UTC (permalink / raw)
To: help-gnu-emacs
I have Windows 10, running "GNU Emacs 27.1 (build 1, i686-w64-mingw32)
of 2020-08-21".
I used this (not perfect) tutorial to setup emacs.
https://realpython.com/emacs-the-best-python-editor/
I learned that installing "elpy" from melpa (via emacs) is not enough.
"elpy" uses external commandline tools (e.g. flake8) - but very
intransparent to the user. Even the official documentation is not clear
about that part.
https://elpy.readthedocs.io/_/downloads/en/latest/pdf/
The documentation only offers a name. No URL to a project side or bug
tracker nor an email.
I do not want to neg here. I want to learn how to do my stuff AND how to
improve the project/community. So a side-question: What would be the
usual way to find the project website for an emacs-mode and open a
ticket?
Ok, back to the main problem.
I explicite installed flake8 via pip. It works because C-c C-v does show
my expected syntax errors.
But the tutorial I first mentioned here tells me elpy should show me
syntax errors on the fly/live while I am typing. But it does not.
How can I go on with diagnosis in that case?
The elpy doc tells me the syntax checking only happens when the file is
saved.
But the tutorial indicates that it happens on the fly. I am confused.
Is there an alternative to have a real on the fly syntax checking while
typing?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: elpy don't syntax check on the fly
2020-10-21 7:48 elpy don't syntax check on the fly c.buhtz
@ 2020-10-21 12:24 ` Jean Louis
0 siblings, 0 replies; 2+ messages in thread
From: Jean Louis @ 2020-10-21 12:24 UTC (permalink / raw)
To: help-gnu-emacs
* c.buhtz@posteo.jp <c.buhtz@posteo.jp> [2020-10-21 10:49]:
> I have Windows 10, running "GNU Emacs 27.1 (build 1, i686-w64-mingw32) of
> 2020-08-21".
>
> I used this (not perfect) tutorial to setup emacs.
> https://realpython.com/emacs-the-best-python-editor/
>
> I learned that installing "elpy" from melpa (via emacs) is not enough.
> "elpy" uses external commandline tools (e.g. flake8) - but very
> intransparent to the user. Even the official documentation is not clear
> about that part.
> https://elpy.readthedocs.io/_/downloads/en/latest/pdf/
> The documentation only offers a name. No URL to a project side or bug
> tracker nor an email.
>
> I do not want to neg here. I want to learn how to do my stuff AND how to
> improve the project/community. So a side-question: What would be the usual
> way to find the project website for an emacs-mode and open a ticket?
What I understand is that elpy is for Python writing.
You can do following:
{M-x package-list-packages RET}
and you will find list of packages, then there is this package:
python 0.27 available gnu
Python's flying circus support for Emacs
so I think that is good to start with, I cannot confirm as I am not
pythonista.
If you have problem with elpy, you can find the library:
{M-x find-library RET elpy RET}
then you may see inside who is author or maintainer and write to them
if you think there is some bug.
If you have a bug inside of Emacs, or need help, you write to this
list, you may also file bugs and suggest improvements in Emacs by
doing:
{M-x report-emacs-bug RET}
The notation I am using between { } helps to activate such commands by
using the package `hyperbola' that you may also find in the package list.
> Ok, back to the main problem.
>
> I explicite installed flake8 via pip. It works because C-c C-v does show my
> expected syntax errors.
> But the tutorial I first mentioned here tells me elpy should show me syntax
> errors on the fly/live while I am typing. But it does not.
I have found IRC channel #elpy but there is nobody inside, one person,
that person could know more about that.
You may connect to IRC by using:
{M-x irc RET}
or
{M-x erc RET}
and then join to channel #elpy on freenode servers.
Usually by using command:
/join #elpy
As in my opinion I do think you need just some basic setup.
> How can I go on with diagnosis in that case?
You could turn on "Enter debugger on error" in the Options menu to
start with.
> The elpy doc tells me the syntax checking only happens when the file is
> saved.
In my opinion, without being user of elpy, I do think it could take
place during writing as well, on the fly.
> But the tutorial indicates that it happens on the fly. I am confused.
>
> Is there an alternative to have a real on the fly syntax checking while
> typing?
Definitely. I am researching that package, myself I find it insecure
to allow various installations through a package, but let us see:
I did:
{M-x elpy-config RET}
it asked me to install virtual environment and other tools, then this
screen appeared:
Elpy Configuration
Emacs.............: 28.0.50
Elpy..............: 1.34.0
Virtualenv........: None
Interactive Python: python 3.6.8 (/usr/bin/python)
RPC virtualenv....: rpc-venv (/home/data1/protected/.emacs.d/elpy/rpc-venv)
Python...........: python 3.6.8 (/home/data1/protected/.emacs.d/elpy/rpc-venv/bin/python)
Jedi.............: Not found
Rope.............: Not found
Autopep8.........: Not found
Yapf.............: Not found
Black............: Not found
Syntax checker....: Not found (flake8)
Warnings
You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.
Elpy could not connect to Pypi (or at least not quickly enough) and
check if the python packages were up-to-date. You can still try to
update all of them:
[Update python packages]
The jedi package is not available. Completion and code navigation will
not work.
[Install jedi]
The autopep8 package is not available. Commands using this will not
work.
[Install autopep8]
The yapf package is not available. Commands using this will not work.
[Install yapf]
The black package is not available. Commands using this will not work.
[Install black]
The configured syntax checker could not be found. Elpy uses this
program to provide syntax checks of your programs, so you might want
to install one. Elpy by default uses flake8.
[Install flake8]
Options
`Raised' text indicates buttons; type RET or click mouse-1 on a button
to invoke its action. Invoke [+] to expand a group, and [-] to
collapse an expanded group. Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.
[+]-- Group Elpy
[+]-- Group Python
[+]-- Group Virtual Environments (Pyvenv)
[ ]-- Group Completion (Company)
[+]-- Group Call Signatures (ElDoc)
[+]-- Group Inline Errors (Flymake)
[+]-- Group Code folding (hideshow)
[ ]-- Group Snippets (YASnippet)
[+]-- Group Directory Grep (rgrep)
[+]-- Group Search as You Type (ido)
[+]-- Group Django extension
[+]-- Group Autodoc extension
Then you would need to follow that screen to install various
components.
Can you confirm you did install all those components?
Jean
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-21 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-21 7:48 elpy don't syntax check on the fly c.buhtz
2020-10-21 12:24 ` Jean Louis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).