GNU bug report logs - #68559
[PATCH] Improve Python shell completion

Previous Next

Package: emacs;

Reported by: Liu Hui <liuhui1610 <at> gmail.com>

Date: Thu, 18 Jan 2024 04:50:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: kobarity <kobarity <at> gmail.com>
To: Liu Hui <liuhui1610 <at> gmail.com>, Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 68559 <at> debbugs.gnu.org
Subject: bug#68559: [PATCH] Improve Python shell completion
Date: Fri, 23 Feb 2024 23:39:05 +0900
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")'.




This bug report was last modified 1 year and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.