I'm trying to make Aquamacs 3.0a GNU Emacs 24.3.50.2 work with iPython 1.2.0 as the interpreter. I was able to get iPython basically working using the instructions in python.el. In particular, I added the settings given in the top answer here to my .emacs file, but I'm still seeing some weird behavior.
Note: The settings in my .emacs file are apparently for iPython 0.11, not 1.2.0, and that may be the source of the problems. I'm not a lisp expert, so any help with this would be greatly appreciated.
Here's one symptom that I'm able to reproduce: the ^C^R (eval region) command may generate a lot of blank "In [X]:" from to the interpreter. To reproduce the problem in aquamacs, I make an file called test.py
and place the following code in it:
spam = "spam "
spam = spam + spam
spam = spam + spam
print spam
Then I type ^C^P (start interpreter), return back to the test.py
buffer, and type ^C^C (eval buffer). The output is:
(... iPython startup message ...)
In [1]:
In [2]:
In [3]:
In [4]: spam spam spam spam
In [5]:
This is all fine. But then I highlight the final line print spam
and then type ^C^R. The output:
In [5]:
In [5]:
In [5]:
Odd, no? Things get much worse for longer files. Even when the active region is one line, I often see 15 blank "In [X]:" lines or more.