Subject: Re: 29.0.50; python.el eldoc problems

From: Carlos Pita <[email-masked]>
Date: Thu, 14 Oct 2021 23:05:20 -0300

I've been delving into the different timeout mechanisms in python.el:

python-shell-completion-native-output-timeout 5.0
python-shell-completion-native-try-output-timeout 1.0
python-eldoc-function-timeout 1
python-eldoc-function-timeout-permanent t
This is in bad shape, in addition to points I've already made above:

- Even though in a clunky way, eldoc at least stops trying after a
timeout in order to avoid causing unbearable UI lags, but that's not
the case with c-a-p. I imagine the rationale here is that c-a-p is not
auto-triggered as eldoc is, but that's not true of company and other
completion backends that will trigger completions under the hood, so
you could end up with constant 5s lag in input.

- Apparently there is no timeout for non-native completions, as in the
case of C-c C-f described above this can freeze emacs, but in this
case it doesn't even have to be manually triggered.

- More complexity but the attempts still fall short. Probably ad hoc
patches have been piling up over the years.

Perhaps we can improve the timeout strategy, simplify it and make it
more coherent, and thus avoid throwing the baby out with the
bathwater. It won't be perfect since documentation sometimes will be
missing, completions sometimes will be missing, the prompt count will
still change mysteriously, but at least it will be safe and
comprehensible.

Best regards,
Carlos