GNU bug report logs - #25753
Python with libedit (macOS default) echoes input, breaks native completion

Previous Next

Package: emacs;

Reported by: charles <at> aurox.ch (Charles A. Roelli)

Date: Thu, 16 Feb 2017 16:09:02 UTC

Severity: normal

Merged with 21431, 22796, 26326

Found in versions 24.5, 25.1, 25.2, 26.1

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

Bug is archived. No further changes may be made.

Full log


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

From: charles <at> aurox.ch (Charles A. Roelli)
To: npostavs <at> users.sourceforge.net
Cc: 25753 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#25753: 25.2; Python mode shell interaction not working 100%
Date: Wed, 22 Feb 2017 20:43:24 +0100
> As I've said, I don't think rc2 would change this, but since it's come
> out now, please test it. 

Tested, and it has the same problem.  Here is what *Python* normally
looks like at the start, run from M-x run-python in emacs -Q:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs, os;__pyfile = codecs.open('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''');exec(compile(__code, '''/var/folders/WP/WPe0Q1iAGc0J7iI6J50jcU+++TI/-Tmp-/py16611qgD''', 'exec'));
python.el: native completion setup loaded

It seems like the line starting with ">>> " should not be printed, if
<nyc4bos <at> aol.com>'s test output is deemed to be running more or less
correctly.  Maybe that can point us in the right direction?

> Can you test the python code from python-shell-completion-native-setup
> outside of Emacs, e.g., save it to a file called 'native-completion.py'
> and then run 'python -i native-completion.py' and then type an
> underscore and hit <tab>.

I get the following:

>>> ___package__
__PYTHON_EL_native_completion_setup
__name__
__doc__
__import__
__debug__

Interestingly, none of the dummy completions pop up.

> Can you try load the attached file in Emacs?  Does it show similar
> output in the "*py native complete test*" buffer?
> 
>     emacs -Q -l py-native-completion.el

I get no completions with this -- here is all that shows up:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> 

> Also post the contents of buffer " *Python completions redirect*"
> after doing M-x run-python.

- emacs -Q
- M-x run-python
- C-x b " *Python completions redirect*"

It's this: "_	^H^H" (space in the middle is a tab character).




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

Previous Next


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