The Unfun Cat
The Unfun Cat

Reputation: 31898

Sending ctrl-r to ipython running in emacs

I have the following simple script in my ~/.emacs:

(defun ipython ()
    (interactive)
    (term "ipython")

It works as I'd like it to, except for that when I try to use the history search with ctrl-r, it is interpreted as an emacs command. How do I avoid this for the ipython interpreter?

For bonus points, please tell me how I can make a key press that will make any command following it be interpreted in ipython, not emacs.

Upvotes: 0

Views: 185

Answers (1)

neal
neal

Reputation: 557

I wish I had a better answer, but if I do (term "/usr/local/bin/ipython"), and hit Ctrl-R, Emacs does the right thing and lets me incremental search through the command history. I'm not sure why your Ctrl-R is behaving differently, but I'm on Emacs 24.4.50.1 on OS X.

You can try hitting Ctrl-Q which is supposed to send the next keystroke to the process literally instead of having Emacs interpret it.

Upvotes: 3

Related Questions