Subject: Re: bug#51196: 29.0.50; python.el eldoc problems

From: Augusto Stoffel <[email-masked]>
Date: Sat, 16 Oct 2021 11:15:36 +0200

On Fri, 15 Oct 2021 at 17:33, Carlos Pita <[email-masked]> wrote:

> Hi Augusto,
>
>> > - Have a sane, solid and simple python.el with good syntax highlighting,
>> >   movements commands, folding, etc. and leave the cleverness to elpy,
>> >   lsp-mode, eglot, emacs-jupyter or whatever.
>>
>> But the problematic Eldoc functionality is disabled by default, right?
>> So leaving it there doesn't hurt anyone --- except for the unwitting
>> user who doesn't know that this feature is kind of broken.
>
> No, it's not, all the magic is enabled by default, only piecemeal
> measures have been taken over the years in order to prevent blocking
> behavior, so for example now eldoc disables itself forever after 1s
> timeout.

I see.  I never noticed this because Eglot masks the completion/eldoc
functions from python.el.

As you already mentioned, the biggest problem here is to use the same
Python process/thread for both REPL interaction _and_
completion/documentation stuff.  Individually, each of these things
works alright, but mixing the two is just never going to work
flawlessly.

> But that's not true of non-native completion AFAICS and
> it certainly isn't of C-c C-f (help on symbol).

If the user explicitly types C-c C-f, then I see no problem in the
blocking behavior.

> And improving on this by adding even more special cases doesn't sound
> like a good idea.
>
> Best regards,
> Carlos