GNU bug report logs -
#79723
30.2; completion-at-point in inferior python session
Previous Next
To reply to this bug, email your comments to 79723 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79723; Package
emacs.
(Thu, 30 Oct 2025 04:23:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Naresh Gurbuxani <naresh_gurbuxani <at> hotmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Thu, 30 Oct 2025 04:23:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In python inferior session, completion-at-point only works the first time.
Subsequent efforts to complete fail. In python script buffer,
completion-at-point works as expected (again and again).
From terminal, I launched emacs using command emacs -Q. I open inferior
python session using M-x run-python. In python session, I type
import os
os.cpu_ #C-M-i completes command to os.cpu_count()
os.getc #C-M-i does not complete command echo area says could not parse
# JSON stream: 1, 1, 1
os.getcwd() #manually typing full command gives correct result
In a python script buffer, both code completions work. I write os.cpu_
on one line, then os.getc on next line. On both lines C-M-i completes
the commands.
My emacs was installed using MacPorts. My python was installed using
package installer from python.org homepage.
In GNU Emacs 30.2 (build 2, aarch64-apple-darwin25.0.0) of 2025-09-25
built on tahoea.local
System Description: macOS 26.0.1
Configured using:
'configure --prefix=/opt/local --disable-silent-rules --without-ns
--without-x --without-dbus --without-gconf --without-libotf
--without-m17n-flt --with-libgmp --with-gnutls --with-xml2
--with-modules --with-sqlite3 --with-webp --with-native-compilation=aot
--infodir /opt/local/share/info/emacs --disable-gc-mark-trace
--with-tree-sitter 'CFLAGS=-pipe -Os -Wno-attributes
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk -arch
arm64' 'CPPFLAGS=-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk'
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie
-Wl,-rpath /opt/local/lib/gcc15
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk
-arch arm64''
Configured features:
ACL GMP GNUTLS LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE PDUMPER SQLITE3
THREADS TREE_SITTER ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Python
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dnd dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq
python rx project compat pcase treesit comint subr-x regexp-opt ansi-osc
ring cl-loaddefs cl-lib ansi-color term/xterm xterm byte-opt gv bytecomp
byte-compile rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select mouse jit-lock font-lock
syntax font-core term/tty-colors frame minibuffer nadvice seq simple
cl-generic indonesian philippine cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue multi-tty
make-network-process native-compile emacs)
Memory information:
((conses 16 82118 11994) (symbols 48 7412 0) (strings 32 20655 2037)
(string-bytes 1 664013) (vectors 16 9773)
(vector-slots 8 114370 9419) (floats 8 35 5) (intervals 56 349 0)
(buffers 992 11))
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79723; Package
emacs.
(Thu, 30 Oct 2025 07:12:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 79723 <at> debbugs.gnu.org (full text, mbox):
> From: Naresh Gurbuxani <naresh_gurbuxani <at> hotmail.com>
> Date: Wed, 29 Oct 2025 16:38:08 +0000
>
>
>
> In python inferior session, completion-at-point only works the first time.
> Subsequent efforts to complete fail. In python script buffer,
> completion-at-point works as expected (again and again).
>
> >From terminal, I launched emacs using command emacs -Q. I open inferior
> python session using M-x run-python. In python session, I type
>
> import os
> os.cpu_ #C-M-i completes command to os.cpu_count()
> os.getc #C-M-i does not complete command echo area says could not parse
> # JSON stream: 1, 1, 1
> os.getcwd() #manually typing full command gives correct result
>
> In a python script buffer, both code completions work. I write os.cpu_
> on one line, then os.getc on next line. On both lines C-M-i completes
> the commands.
>
> My emacs was installed using MacPorts. My python was installed using
> package installer from python.org homepage.
I cannot reproduce this, neither with Emacs 30.2 nor with the current
development master branch. I guess this is either macOS-specific or
maybe specific to the version of Python you have installed. I tried
on GNU/Linux with Python 3.10.12 and on MS-Windows with Python 3.4.4.
Can someone reproduce this on macOS?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79723; Package
emacs.
(Mon, 03 Nov 2025 18:03:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 79723 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Following up on this bug report. I was able to get python completion-at-point working by
Installing python 3.13.9 to replace python 3.14.0
Not using ipython as python-shell-interpreter
Now completion-at-point works with emacs -Q. It also works with my init.el with company mode. My only problem is that I cannot use ipython in inferior python session. When my init.el file includes
python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt"
Then I run into similar problems.
On Oct 30, 2025, at 3:11 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
From: Naresh Gurbuxani <naresh_gurbuxani <at> hotmail.com>
Date: Wed, 29 Oct 2025 16:38:08 +0000
In python inferior session, completion-at-point only works the first time.
Subsequent efforts to complete fail. In python script buffer,
completion-at-point works as expected (again and again).
From terminal, I launched emacs using command emacs -Q. I open inferior
python session using M-x run-python. In python session, I type
import os
os.cpu_ #C-M-i completes command to os.cpu_count()
os.getc #C-M-i does not complete command echo area says could not parse
# JSON stream: 1, 1, 1
os.getcwd() #manually typing full command gives correct result
In a python script buffer, both code completions work. I write os.cpu_
on one line, then os.getc on next line. On both lines C-M-i completes
the commands.
My emacs was installed using MacPorts. My python was installed using
package installer from python.org homepage.
I cannot reproduce this, neither with Emacs 30.2 nor with the current
development master branch. I guess this is either macOS-specific or
maybe specific to the version of Python you have installed. I tried
on GNU/Linux with Python 3.10.12 and on MS-Windows with Python 3.4.4.
Can someone reproduce this on macOS?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79723; Package
emacs.
(Tue, 04 Nov 2025 12:04:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 79723 <at> debbugs.gnu.org (full text, mbox):
> From: Naresh Gurbuxani <naresh_gurbuxani <at> hotmail.com>
> CC: "79723 <at> debbugs.gnu.org" <79723 <at> debbugs.gnu.org>
> Date: Mon, 3 Nov 2025 18:01:44 +0000
>
> Following up on this bug report. I was able to get python completion-at-point working by
>
> Installing python 3.13.9 to replace python 3.14.0
> Not using ipython as python-shell-interpreter
>
> Now completion-at-point works with emacs -Q. It also works with my init.el with company mode. My only
> problem is that I cannot use ipython in inferior python session. When my init.el file includes
>
> python-shell-interpreter "ipython"
> python-shell-interpreter-args "-i --simple-prompt"
>
> Then I run into similar problems.
I'm not sure this is supposed to work with ipython, and I don't have
it to check.
Could some Python expert please chime in and help us out?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79723; Package
emacs.
(Tue, 04 Nov 2025 15:23:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 79723 <at> debbugs.gnu.org (full text, mbox):
On 2025-11-04 07:03, Eli Zaretskii wrote:
>> From: Naresh Gurbuxani <naresh_gurbuxani <at> hotmail.com>
>> --8<--
>> When my init.el file includes
>>
>> python-shell-interpreter "ipython"
>> python-shell-interpreter-args "-i --simple-prompt"
>>
>> Then I run into similar problems.
>
> I'm not sure this is supposed to work with ipython, and I don't have
> it to check.
The commentary suggests that IPython is officially supported, and
Naresh’s settings are mentioned.
With the following versions (on Linux) I observe similar completion
behaviour.
python: 3.13.7
ipython: 9.6.0
Emacs 30.2:
1. python -i : works
2. ipython -i --simple-prompt : doesn’t work (“No match”)
Emacs master:
1. python -i : works
2. ipython -i --simple-prompt : works
Best,
--
Jacob S. Gordon
jacob.as.gordon <at> gmail.com
Please avoid sending me HTML emails and MS Office documents.
https://useplaintext.email/#etiquette
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79723; Package
emacs.
(Wed, 05 Nov 2025 13:05:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 79723 <at> debbugs.gnu.org (full text, mbox):
Jacob S. Gordon wrote:
>
> On 2025-11-04 07:03, Eli Zaretskii wrote:
> >> From: Naresh Gurbuxani <naresh_gurbuxani <at> hotmail.com>
> >> --8<--
> >> When my init.el file includes
> >>
> >> python-shell-interpreter "ipython"
> >> python-shell-interpreter-args "-i --simple-prompt"
> >>
> >> Then I run into similar problems.
> >
> > I'm not sure this is supposed to work with ipython, and I don't have
> > it to check.
>
> The commentary suggests that IPython is officially supported, and
> Naresh’s settings are mentioned.
>
> With the following versions (on Linux) I observe similar completion
> behaviour.
>
> python: 3.13.7
> ipython: 9.6.0
>
> Emacs 30.2:
>
> 1. python -i : works
> 2. ipython -i --simple-prompt : doesn’t work (“No match”)
>
> Emacs master:
>
> 1. python -i : works
> 2. ipython -i --simple-prompt : works
This is due to the fix of Bug#76205. I reproduced the problem using
python.el on emacs-30 branch, and confirmed that applying the fix of
Bug#76205 (commit a75f4449fa2) resolves the problem. This fix is
required for completion to work with IPython based on Python 3.13.
However, I'm not sure if it's the same issue that Naresh is reporting.
Can you test with the commit a75f4449fa2?
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.