Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: really start REPL also in emacs 25.1 #7070

Closed
wants to merge 1 commit into from

Conversation

bmag
Copy link
Contributor

@bmag bmag commented Sep 9, 2016

Make python-start-or-switch-repl start a REPL when necessery also in Emacs 25.1. Fixes #6628.

The new version is supposed to work in Emacs 24.4, 24.5 and 25.1. For any daily python users: please confirm that this change doesn't break SPC m ' if you're on 24.4 or 24.5, or confirm that it makes SPC m ' work if you're on 25.1.

Edit: this PR also fixes #2872

Make `python-start-or-switch-repl` start a REPL when necessery also in
Emacs 25.1. Previously in Emacs 25.1 it wouldn't do anything if the REPL
wasn't started already.
@elvis-sik
Copy link

I am on 25.1

It works. I can open a REPL and send code to it.
However I am getting the following message when I open a REPL:

Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "ipython" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list.  Native completions have been disabled locally. 

This appears when I open a .py file and again when I press SPC m '. The REPL doesn't open. Then I press SPC m ' again, no warning occurs, and the REPL opens.

@elvis-sik
Copy link

I see the code in this commit doesn't touch this variable, so this warning might not be related. It didn't happen up to a when the REPL stopped working, though (maybe it stopped because emacs was upgraded? Idk).

@lukeorland
Copy link

I got this in the Inferior Python buffer that opened up:

Unknown option: --
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

Process Python exited abnormally with code 2

@bmag
Copy link
Contributor Author

bmag commented Oct 6, 2016

@lukeorland probably not related to this PR, but there's not enough info to know for sure. If the same happens with SPC SPC run-python, then for sure the error has nothing to do with the PR.

@hujianxin
Copy link
Contributor

We need this PR!!! 😄

@jecastro1
Copy link

I have tested this PR and it's working fine.

The warning is related to a bug in upstream emacs https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24401. My current workaround is to set python-shell-completion-native-enable to nil, but it's not a real solution. However, I haven't tested what the guy in the bug report says.

Liu233w pushed a commit to Liu233w/.spacemacs.d that referenced this pull request Oct 12, 2016
@TheBB
Copy link
Contributor

TheBB commented Oct 17, 2016

Thanks! Cherry-picked in develop. You can safely delete your branch.

@TheBB TheBB closed this Oct 17, 2016
@bmag bmag deleted the fix-python-shell-start branch October 17, 2016 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants