GNU bug report logs -
#68559
[PATCH] Improve Python shell completion
Previous Next
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
kobarity wrote:
> Liu Hui wrote:
> > Thanks for pointing it out. The attached patch should now restore
> > previous basic completion behavior in comments.
>
> Thanks, I confirmed that basic completion (without keyword argument
> completion) can be performed within comments.
One additional comment regarding ERT. pyenv installs an ipython shim
to the shims directory, if there is at least one virtualenv providing
ipython. It can be found by `executable-find'. However, it is not
usable unless the virtualenv is activated. As a result, the
`python-shell-completion-at-point-ipython' ERT would fail unless a
virtualenv which provides ipython is activated.
This may be something pyenv users should take care of, but it is more
convenient for pyenv users like me to make the following changes.
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index ae23ff8ebe2..9452f136cfb 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -4854,7 +4854,10 @@ python-shell-completion-at-point-ipython
"Check if Python shell completion works for IPython."
(let ((python-shell-interpreter "ipython")
(python-shell-interpreter-args "-i --simple-prompt"))
- (skip-unless (executable-find python-shell-interpreter))
+ (skip-unless
+ (and
+ (executable-find python-shell-interpreter)
+ (eql (call-process python-shell-interpreter nil nil nil "--version") 0)))
(python-tests-with-temp-buffer-with-shell
""
(python-shell-with-shell-buffer
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.