bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68559: [PATCH] Improve Python shell completion


From: kobarity
Subject: bug#68559: [PATCH] Improve Python shell completion
Date: Fri, 23 Feb 2024 23:39:05 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Liu,

I noticed that with Non-native completions, Jedi completion is not
enabled even if PYTHONSTARTUP is set and "REPL completion using Jedi
0.18.2" is shown in inferior Python. Is this expected behavior?  Jedi
completion is enabled regardless of PYTHONSTARTUP setting when I use
IPython with Non-native completions.

Mattias Engdegård wrote:
> > I think we can also improve Non-native completions.  Current
> > implementation sends the definition of __PYTHON_EL_get_completions()
> > every time.  However, sending it once during initialization should be
> > sufficient.  Worse, if the number of characters sent exceeds
> > `comint-max-line-length', it will be sent via file.  This is happening
> > in your environment.  Here is the log you presented.
> > 
> > Test python-completion-at-point-1 backtrace:
> >  json-parse-string("__PYTHON_EL_eval_file(\"/var/folders/qy/zstv16390
> > 
> > Thanks to the echo back, we can see __PYTHON_EL_eval_file() was used.
> 
> Right. (The need for a file is just an artefact of Comint limitations, isn't 
> it?)

Yes, I think it is the limitation of comint.  However, if the
definition is omitted, it is unlikely to reach that limit, since all
that is required is to send the string like
'__PYTHON_EL_get_completions("subproc")'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]