Subject: Re: bug#24322: [PATCH] Re: 25.1.50; Python completion should not strip trailing space

From: [email-masked]
Date: Mon, 03 Jul 2017 18:02:13 -0400

tags 24322 + confirmed
severity 24322 minor
quit

Sorry it took so long for someone to reach this report.

Dan Davison <[email-masked]> writes:

>>>> From emacs -Q:
>>>>
>>>> (setq python-shell-interpreter "ipython"
>>>>       python-shell-interpreter-args "-i")

Using plain "python" shows the behaviour you describe.  I can't really
get ipython working properly unless I add --simple-prompt to
python-shell-interpreter-args, and then it seems that ipython itself
prints the completions without a space.

I'm using ipython 5.1.0, I think I've read in some other bug that the
--simple-prompt started being necessary from version 5.x.

> The patch currently only fixes "native" (readline-based) completion. If it
> is agreed that this is the correct direction I can prepare a similar patch
> for the non-native / legacy completion function
> `python-shell-completion-get-completions', which shows the same behavior.

Yes please!