unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: charles@aurox.ch (Charles A. Roelli)
Cc: 25753@debbugs.gnu.org
Subject: bug#25753: 25.2; Python mode shell interaction not working 100%
Date: Thu, 23 Feb 2017 09:20:01 -0500	[thread overview]
Message-ID: <87o9xtf0q6.fsf@users.sourceforge.net> (raw)
In-Reply-To: <m24lzmm2oz.fsf@aurox.ch> (Charles A. Roelli's message of "Wed, 22 Feb 2017 20:43:24 +0100")

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

charles@aurox.ch (Charles A. Roelli) writes:
>
> 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@aol.com>'s test output is deemed to be running more or less
> correctly.  Maybe that can point us in the right direction?

Hmm, it's odd, though since you're still getting the "setup loaded"
message, the code *is* getting evaluated anyway, so it's likely that
this problem is not directly related.  Let's see if we can track it down
anyway, try the loading the attached as

    emacs -Q -l py-trace-bad-output.el

and see if anything shows up in *Messages*.


[-- Attachment #2: tracing code --]
[-- Type: application/emacs-lisp, Size: 595 bytes --]

[-- Attachment #3: Type: text/plain, Size: 679 bytes --]


>> 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.

This seems to be the core of the problem.  I gather that macOS uses
libedit instead of readline by default, perhaps that is the source of
incompatibility.  Can you figure out how to change the python code so
that the dummy completions do show up?

  reply	other threads:[~2017-02-23 14:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 16:07 bug#25753: 25.2; Python mode shell interaction not working 100% Charles A. Roelli
2017-02-16 17:54 ` Eli Zaretskii
2017-02-18 17:44   ` npostavs
2017-02-19 15:14     ` Live System User
2017-02-19 15:26       ` Noam Postavsky
2017-02-19 19:39         ` Live System User
2017-02-19 20:00           ` Noam Postavsky
2017-02-19 21:32             ` Live System User
2017-02-20  1:30               ` npostavs
2017-02-20 22:34                 ` Live System User
2017-02-21  1:46                   ` npostavs
2017-02-21  3:32                     ` Live System User
2017-02-21 13:35                       ` npostavs
2017-02-21 23:17                         ` Live System User
2017-02-22  1:40     ` npostavs
2017-02-22 19:43       ` Charles A. Roelli
2017-02-23 14:20         ` npostavs [this message]
2017-02-24 10:19           ` Charles A. Roelli
2017-02-25 14:11           ` Charles A. Roelli
2017-02-25 14:34             ` npostavs
2017-02-25 22:28               ` Charles A. Roelli
2017-02-27  2:14                 ` npostavs
2017-02-28 10:34                   ` Charles A. Roelli
2017-02-28 14:07                     ` npostavs
2017-02-28 15:56                       ` Eli Zaretskii
2017-03-01 23:00                         ` npostavs
2021-10-03 16:03 ` Carlos Pita
2021-10-03 16:31   ` Carlos Pita
2021-10-03 23:35     ` Carlos Pita
2021-10-03 23:55       ` Carlos Pita
2021-10-04  0:46         ` Carlos Pita
2021-10-04 15:05           ` Carlos Pita
2021-10-04  8:21         ` Augusto Stoffel
2021-10-04 15:31           ` Carlos Pita
2021-10-04 15:47             ` Augusto Stoffel
2023-08-11 17:55 ` bug#25753: 29.1; " Peter Mao
2023-08-25  5:32   ` Peter Mao
2023-08-25  6:31     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9xtf0q6.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=25753@debbugs.gnu.org \
    --cc=charles@aurox.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).