unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Pankaj Jangid <pankaj@codeisgreat.org>
Cc: Doug Davis <ddavis@ddavis.io>, 48609@debbugs.gnu.org
Subject: bug#48609: Eglot and tab-always-indent conflict in python-mode
Date: Tue, 25 May 2021 10:36:23 +0100	[thread overview]
Message-ID: <87y2c3f948.fsf@gmail.com> (raw)
In-Reply-To: <m2k0nngvit.fsf@codeisgreat.org> (Pankaj Jangid's message of "Tue, 25 May 2021 12:17:06 +0530")

Pankaj Jangid <pankaj@codeisgreat.org> writes:

> João Távora <joaotavora@gmail.com> writes:
>
>> When Eglot is active, the completion system can find a large number of
>> completions available for that empty line.  Since you have selected
>> tab-always-indent to be 'complete, Eglot will request and present those
>> completions in the *Completions* buffer.
>>
>> The only way to cancel that operation is by C-g or clicking somewhere
>> else.  This in turn makes it so that the "last" command issued isn't
>> indent-for-tab-command anymore, and so there aren't two
>> indent-for-tab-command commands in a row.  And that is the criteria
>> consulted by python.el's indentation function to decide to cycle the
>> indentation.
>>
>> So I'm not sure what needs to be fixed here, if anything, or how you
>> would like this to behave.
>
> I think that the best place should be python.el then. A variable
> ‘python-completion-on-empty-line’ or some better name. I don’t know if
> such a variable already exist or not. Need to check.

Yes, I agree, python.el.  I wonder if instead of that variale the
cycling logic could be changed to account for this case where there may
be completions at point (Eglot is only one possible provider of such
completions, btw.)

João






  reply	other threads:[~2021-05-25  9:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23 14:55 bug#48609: Eglot and tab-always-indent conflict in python-mode Pankaj Jangid
2021-05-23 20:41 ` João Távora
2021-05-23 21:02   ` Doug Davis
2021-05-23 21:17     ` João Távora
2021-05-23 21:38       ` João Távora
2021-05-24  8:17         ` Andrii Kolomoiets
2021-05-25  6:41           ` Pankaj Jangid
2021-05-25  9:32             ` João Távora
2021-05-25  6:47         ` Pankaj Jangid
2021-05-25  9:36           ` João Távora [this message]
2021-05-25 14:08             ` Pankaj Jangid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2c3f948.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=48609@debbugs.gnu.org \
    --cc=ddavis@ddavis.io \
    --cc=pankaj@codeisgreat.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).