1
votes

I've switched from ipython 0.10-11.1 to 1.1.0

Now, using Emacs together with the new ipython version I run into the following two problems:

1) Tab completion in Emac's ipython py-shell (C-c !) stopped working for me. Say, if I try to complete 'pl' into 'plot' and so pl<Tab>, the only thing I get in the minibuffer is

Can't find completion for "pl" based on line pl

There are many similar reports about this on the web, however none of the fixes I found solve the issue for me. In particular the additions to ~/.emacs/init.el suggested at http://www.emacswiki.org/emacs/PythonProgrammingInEmacs, in section IPython just don't 'do' anything.

2) When I start the py-shell on a any given buffer foo.py, which is open within one of several Emacs subwindows, then, all other subwindows, except for the one corresponding to foo.py and the newly started (ipython) py-shell get closed.

Both of these issues where absent in ipython 0.10-11.1. Anyone has an idea?

My Emacs version: GNU Emacs 23.2.1. My ipython.el version: defconst ipython-version "0.11" from https://github.com/ipython/ipython/tree/master/docs/emacs

2

2 Answers

0
votes

Completion from a (I)Python-shell is just TAB

C-c ! from inside a shell should open another shell, but seems broken indeed, resp. it's not available.

https://bugs.launchpad.net/python-mode/+bug/1234539 Fixed in trunk meanwhile.

BTW to open a second shell from inside, C-u M-x python should work.

Did you set py-python-command-args accordingly? Assume plot needs option -pylab.

Troubleshooting:

Start with Emacs -Q from the directory where python-mode.el lives. Open python-mode.el and evaluate it.

Open a --maybe empty-- file with ending ".py".

Python-mode should be switched on.

M-x python RET

a regular Python-shell should appear.

M-x ipython RET

an IPython-shell should open.

Always call (I)Python-shell from a python-mode activated already. Otherwise shipped python.el or other stuff might come between.

Link shows TAB-completion with IPython-1.1.0 at work:

https://launchpadlibrarian.net/152211804/ex.png

0
votes

The previous answer does not provide any clue for how to get TAB-completion to work with IPython-1.1.0 and GNU Emacs 23.2.1. In fact the troubleshooting steps, starting from a bare-bones Emacs, do not lead to an IPython-shell with working TAB-completion. Moreover the image at https://launchpadlibrarian.net/152211804/ex.png claiming TAB-completion at work with IPython-1.1.0 depicts an Emacs 24.3.50.1, rather than an Emacs 23.2.1 which I was referring to in my question.

For me the solution was: get rid of IPython-1.1.0 reinstall IPython 0.10-11.1.

(That leaves you without the more recent notebook feature - which is fine if Emacs is at the core of your Python workflow anyway)