[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IPython-User] launch/run IPython in emacs buffer

From: Richard Everson
Subject: Re: [IPython-User] launch/run IPython in emacs buffer
Date: Thu, 30 Sep 2010 21:06:16 +0100

> * I'd like also to be able to open an IPython buffer from anywhere (in
>  emacs), since I often use IPython as a calculator and scratchpad.

M-x py-shell 

will get you a new (I)Python shell.

> 1 fix M-p in IPython in shell-mode. When I run IPython in emacs shell
>  mode (i.e. running `ipython` from a prompt after running `M-x shell`),
>  IPython runs (with correct prompt, thanks Andrew Wilson). But when I
>  attempt to scroll IPython history (with M-p at the IPython prompt), I
>  instead get bash history. Is there a way to make shell-mode pass the
>  M-p event to IPython?

This works for me in the sense that I get history from emacs (via comint) 
rather than IPython's history, which works pretty well.  It sounds to me as if 
comint (which is responsible for running IPython) is picking up your bash shell 
history. In fact if I have a running IPython shell and then start a new zsh 
with M-x shell, type a couple of shell commands to the shell and then use M-p 
to get the history,  I get the shell commands and followed by my most recent 
IPython commands and switching buffers to IPython and using M-p gives me the 
shell commands and then the IPython history.  It looks to me as if you might do 
something like what's on the emacswiki: , but I'm afraid I haven't 
time right now to try it.

Richard Everson.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]