elpy and evil-mode do not react on TAB
X-Post: https://emacs.stackexchange.com/q/61497/12999 and https://lists.gnu.org/archive/html/help-gnu-emacs/2020-11/msg00061.html Hi, my problem is that the TAB key does nothing in elpy (python) mode and evil-mode also. This is my elpy-config
1Elpy Configuration 2 3Virtualenv........: None 4RPC Python........: 3.7.3 (/usr/bin/python3) 5Interactive Python: /usr/bin/python3 (/usr/bin/python3) 6Emacs.............: 26.1 7Elpy..............: 1.28.0 8Jedi..............: 0.17.2 9Rope..............: Not found 10Autopep8..........: 1.5.3 11Yapf..............: Not found 12Black.............: Not found 13Syntax checker....: flake8 (/usr/local/bin/flake8)
It runs on Debian 10. When typing TAB nothing happens. No message. No change in the mode line or status line. I would expect 4 empty chars when typing TAB. M-x describe-key TAB results in
TAB (translated from <tab>) runs the command evil-jump-forward (found in evil-motion-state-map), which is an interactive compiled Lisp function in ‘~/.MyAppData/emacs.d/elpa/evil-20201014.2043/evil-commands.el’.
It is bound to TAB.
(evil-jump-forward &optional COUNT)
Go to newer position in jump list. To go the other way, press C-o.
I have evil-mode installed and activated. So there must be a reason why TAB is used by evil-mode but do not work. btw: I am quite new to emacs. kind Christian
A side not: The problem appears with "emacs" and "emacs -nw". On 2020-11-02 22:26 <[email protected]> wrote:
X-Post: https://emacs.stackexchange.com/q/61497/12999 and https://lists.gnu.org/archive/html/help-gnu-emacs/2020-11/msg00061.html
Hi,
my problem is that the TAB key does nothing in elpy (python) mode and evil-mode also.
This is my elpy-config
1Elpy Configuration 2 3Virtualenv........: None 4RPC Python........: 3.7.3 (/usr/bin/python3) 5Interactive Python: /usr/bin/python3 (/usr/bin/python3) 6Emacs.............: 26.1 7Elpy..............: 1.28.0 8Jedi..............: 0.17.2 9Rope..............: Not found 10Autopep8..........: 1.5.3 11Yapf..............: Not found 12Black.............: Not found 13Syntax checker....: flake8 (/usr/local/bin/flake8)
It runs on Debian 10.
When typing TAB nothing happens. No message. No change in the mode line or status line. I would expect 4 empty chars when typing TAB.
M-x describe-key TAB results in
TAB (translated from <tab>) runs the command evil-jump-forward (found in evil-motion-state-map), which is an interactive compiled Lisp function in ‘~/.MyAppData/emacs.d/elpa/evil-20201014.2043/evil-commands.el’.
It is bound to TAB.
(evil-jump-forward &optional COUNT)
Go to newer position in jump list. To go the other way, press C-o.
I have evil-mode installed and activated. So there must be a reason why TAB is used by evil-mode but do not work.
btw: I am quite new to emacs.
kind Christian
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Have you tried running it without evil-mode ("emacs -Q") Best, Sanel [email protected] writes:
A side not: The problem appears with "emacs" and "emacs -nw".
On 2020-11-02 22:26 <[email protected]> wrote:
X-Post: https://emacs.stackexchange.com/q/61497/12999 and https://lists.gnu.org/archive/html/help-gnu-emacs/2020-11/msg00061.html
Hi,
my problem is that the TAB key does nothing in elpy (python) mode and evil-mode also.
This is my elpy-config
1Elpy Configuration 2 3Virtualenv........: None 4RPC Python........: 3.7.3 (/usr/bin/python3) 5Interactive Python: /usr/bin/python3 (/usr/bin/python3) 6Emacs.............: 26.1 7Elpy..............: 1.28.0 8Jedi..............: 0.17.2 9Rope..............: Not found 10Autopep8..........: 1.5.3 11Yapf..............: Not found 12Black.............: Not found 13Syntax checker....: flake8 (/usr/local/bin/flake8)
It runs on Debian 10.
When typing TAB nothing happens. No message. No change in the mode line or status line. I would expect 4 empty chars when typing TAB.
M-x describe-key TAB results in
TAB (translated from <tab>) runs the command evil-jump-forward (found in evil-motion-state-map), which is an interactive compiled Lisp function in ‘~/.MyAppData/emacs.d/elpa/evil-20201014.2043/evil-commands.el’.
It is bound to TAB.
(evil-jump-forward &optional COUNT)
Go to newer position in jump list. To go the other way, press C-o.
I have evil-mode installed and activated. So there must be a reason why TAB is used by evil-mode but do not work.
btw: I am quite new to emacs.
kind Christian
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Dear Sanel, thank you for your reply. Am 02.11.2020 23:32 schrieb Sanel Zukan:
Have you tried running it without evil-mode ("emacs -Q")
Did you mean "-q"? I tried both but nothing changed in the behavior. To keep sure I deinstalled emacs. It means I purged (and autoremove) every installed package with "emacs" in its name and verified this of course. I also did "rm -rf" on "/.emacs.d" - "~/.emacs" did not exist. OK, emacs is gone now from the system. Installed it again with "apt install emacs" - without elpy and evil. Starting with "emacs foo" (mode: Fundamental) -> TAB does work. Starting with "emacs foo.py" (mode: Python ElDoc) -> TAB does not work. OK, installed evil only via "apt install elpa-evil". Actiavted evil in the "~/.emacs.d/init.el" with this two lines: (require 'evil) (evil-mode 1) Starting with "emacs foo" (mode: Fundamental Undo-Tree) -> TAB does work in evil-mode ("<Z>") and standard-emacs-mode ("<E>"). Starting with "emacs foo.py" (mode: Python Undo-Tree ElDoc) -> TAB does not work in Z- or E-mode. I will stop here and do not install elpa-elpy also. Because it would make the situation to complexe. First I would like to find out (and how to find out) why TAB does not work in standard emacs-python-mode?
Hi, OK, after reminding myself how python-mode works (I probably get used to that behavior, and I'm not frequent python user), this *is* expected behavior. In python-mode, when you start typing, hitting TAB will not do anything, presumably preventing you from accidental TAB inserts which will trigger errors in python interpreter. However, if you want to insert TAB forcefully see [1]. E.g. setting "(setq tab-always-indent nil)" will force TAB to be inserted, but will also adjust other indentation. However, if you want vi-like TAB behavior with evil-mode, python and without too much of TAB science, set this in your init file: (define-key evil-insert-state-map (kbd "TAB") 'tab-to-tab-stop) If you are keen to look further for customization, check [2]. [1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode_002dSpecific-... [2] https://dougie.io/emacs/indentation/ Best, Sanel [email protected] writes:
Dear Sanel,
thank you for your reply.
Am 02.11.2020 23:32 schrieb Sanel Zukan:
Have you tried running it without evil-mode ("emacs -Q")
Did you mean "-q"? I tried both but nothing changed in the behavior.
To keep sure I deinstalled emacs. It means I purged (and autoremove) every installed package with "emacs" in its name and verified this of course. I also did "rm -rf" on "/.emacs.d" - "~/.emacs" did not exist. OK, emacs is gone now from the system.
Installed it again with "apt install emacs" - without elpy and evil.
Starting with "emacs foo" (mode: Fundamental) -> TAB does work. Starting with "emacs foo.py" (mode: Python ElDoc) -> TAB does not work.
OK, installed evil only via "apt install elpa-evil". Actiavted evil in the "~/.emacs.d/init.el" with this two lines: (require 'evil) (evil-mode 1)
Starting with "emacs foo" (mode: Fundamental Undo-Tree) -> TAB does work in evil-mode ("<Z>") and standard-emacs-mode ("<E>"). Starting with "emacs foo.py" (mode: Python Undo-Tree ElDoc) -> TAB does not work in Z- or E-mode.
I will stop here and do not install elpa-elpy also. Because it would make the situation to complexe. First I would like to find out (and how to find out) why TAB does not work in standard emacs-python-mode?
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Dear Sanel, thanks a lot for explanation. Am 03.11.2020 12:44 schrieb Sanel Zukan:
this *is* expected behavior.
I assumed that. The "error" is just in front of the screen. But I tried to understand. I understand and like the behaviour now. No need to re-configure anything. TAB work in some very restricted situations where it is (in python meaning) allowed. e.g. you type this two lines def foo(): """ after hitting RET the cursor is in the next (3rd) line but on first character/column. Now you are allowed to hit TAB and it works a "Tab" (4 empty chars) are inserted. Hitting TAB again the cursor jumps back to column 1. Great! So intelligent and powerfull. That is why I migrate (my brain) from vim to emacs. :D btw: It would be great if you could add your answere here https://emacs.stackexchange.com/q/61497/12999
[email protected] writes:
thanks a lot for explanation.
No problem!
btw: It would be great if you could add your answere here https://emacs.stackexchange.com/q/61497/12999
If you can, please copy/paste the answer or link to it as I don't have SO account :) Best regards, Sanel
participants (2)
-
c.buhtz@posteo.jp -
Sanel Zukan