GNU bug report logs - #44732
27.1; Inferior Python mode does not correctly display output of ipython3

Previous Next

Package: emacs;

Reported by: Brian Leung <leungbk <at> mailfence.com>

Date: Thu, 19 Nov 2020 01:05:02 UTC

Severity: normal

Tags: confirmed

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44732 in the body.
You can then email your comments to 44732 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#44732; Package emacs. (Thu, 19 Nov 2020 01:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Leung <leungbk <at> mailfence.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 19 Nov 2020 01:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Leung <leungbk <at> mailfence.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; Inferior Python mode does not correctly display output of
 ipython3
Date: Thu, 19 Nov 2020 02:04:36 +0100 (CET)
- emacs -q
- (setq python-shell-interpreter "ipython3")
- M-x run-python
- Enter 1 + 2 into the IPython prompt.

After hitting Enter, the '2' displays twice:

Python 3.8.6 (default, Sep 23 2020, 13:54:27) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.17.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: 1 + 2
1 + 22
Out[1]: 3

In [2]:


-- 
Sent with https://mailfence.com
Secure and private email




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44732; Package emacs. (Tue, 24 Nov 2020 07:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 44732 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Brian Leung <leungbk <at> mailfence.com>
Cc: 44732 <at> debbugs.gnu.org
Subject: Re: bug#44732: 27.1; Inferior Python mode does not correctly
 display output of ipython3
Date: Tue, 24 Nov 2020 08:55:49 +0100
Brian Leung <leungbk <at> mailfence.com> writes:

> In [1]: 1 + 2
> 1 + 22
> Out[1]: 3
>
> In [2]:

Not only that, it grows progressively weirder:

In [1]: 1 + 2
1 + 22
Out[1]: 3

In [2]: 1 + 3
11  ++  3333
Out[2]: 4

In [3]: 4 + 5
444   +++   555555
Out[3]: 9

In [4]: 1 + 2
1111    ++++    22222222
Out[4]: 3

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 24 Nov 2020 07:57:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44732; Package emacs. (Wed, 25 Aug 2021 18:32:01 GMT) Full text and rfc822 format available.

Message #13 received at 44732 <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: 44732 <at> debbugs.gnu.org
Subject: 27.1; Inferior Python mode does not correctly display output of
 ipython3
Date: Wed, 25 Aug 2021 20:30:57 +0200
This is solved by adding the following extra argument to ipython:

(setq python-shell-interpreter "ipython3"
      python-shell-interpreter-args "--simple-prompt")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44732; Package emacs. (Thu, 26 Aug 2021 14:22:02 GMT) Full text and rfc822 format available.

Message #16 received at 44732 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 44732 <at> debbugs.gnu.org
Subject: Re: bug#44732: 27.1; Inferior Python mode does not correctly
 display output of ipython3
Date: Thu, 26 Aug 2021 16:21:27 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> This is solved by adding the following extra argument to ipython:
>
> (setq python-shell-interpreter "ipython3"
>       python-shell-interpreter-args "--simple-prompt")

Should the defaults in python.el be changed?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44732; Package emacs. (Thu, 26 Aug 2021 15:04:02 GMT) Full text and rfc822 format available.

Message #19 received at 44732 <at> debbugs.gnu.org (full text, mbox):

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44732 <at> debbugs.gnu.org
Subject: Re: bug#44732: 27.1; Inferior Python mode does not correctly
 display output of ipython3
Date: Thu, 26 Aug 2021 17:02:54 +0200
On Thu, 26 Aug 2021 at 16:21, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
>> This is solved by adding the following extra argument to ipython:
>>
>> (setq python-shell-interpreter "ipython3"
>>       python-shell-interpreter-args "--simple-prompt")
>
> Should the defaults in python.el be changed?

No, the defaults are good.  But there's a pitfall: if you change the
interpreter from "python" to the fancier "ipython", you need to add the
extra "--simple-prompt" argument.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44732; Package emacs. (Fri, 27 Aug 2021 02:52:02 GMT) Full text and rfc822 format available.

Message #22 received at 44732 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 44732 <at> debbugs.gnu.org
Subject: Re: bug#44732: 27.1; Inferior Python mode does not correctly
 display output of ipython3
Date: Fri, 27 Aug 2021 04:51:13 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> No, the defaults are good.  But there's a pitfall: if you change the
> interpreter from "python" to the fancier "ipython", you need to add the
> extra "--simple-prompt" argument.

Ah, I see.  I've now amended the doc string of
`python-shell-interpreter' to mention this.  And I think that should be
sufficient here, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 44732 <at> debbugs.gnu.org and Brian Leung <leungbk <at> mailfence.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 27 Aug 2021 02:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Sep 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 226 days ago.

Previous Next


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