Subject: bug#48609: Eglot and tab-always-indent conflict in python-mode

From: João Távora <[email-masked]>
Date: Sun, 23 May 2021 21:41:22 +0100

Pankaj Jangid <[email-masked]> writes:

> If ‘eglot’ is running and ‘tab-always-indent’ is set to ’complete. Then
> in python-mode, TAB doesn’t cycle point column positions. For example,
> in the following code if you are at end of line 2 and then you press RET
> then TAB doesn’t move the point to left margin. Without ‘eglot’ this
> works fine.
>
> #+begin_src python
> def greet(s):
>     print(f"Hello {s}!")
> #+end_src

Hello Pankaj,

I cannot reproduce this.  Here's what I ran:

  $ emacs --version | head -1
  GNU Emacs 26.3
  $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \
    ~/path/to/a/python/file.py -f eglot

This opens the file which has your example contents, and starts up
eglot.  I move point to the end of line 2, press RET and press TAB
twice.  Point is at the left margin.

Without Eglot, the result is exactly the same.

I would find it odd that Eglot messes with TAB behaviour, but I'm
waiting for a more complete reproduction recipe from your part so we can
understand what's going on.

João