From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Everson Newsgroups: gmane.comp.python.ipython.user,gmane.emacs.help Subject: Re: launch/run IPython in emacs buffer Date: Thu, 30 Sep 2010 21:06:16 +0100 Message-ID: <87340DF3-7703-46B1-AE86-9F4F05747520@exeter.ac.uk> References: <87ocbf5rhg.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1285877202 27494 80.91.229.12 (30 Sep 2010 20:06:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Sep 2010 20:06:42 +0000 (UTC) Cc: ipython-user@scipy.org, help-gnu-emacs@gnu.org To: Tom Roche Original-X-From: ipython-user-bounces@scipy.org Thu Sep 30 22:06:39 2010 Return-path: Envelope-to: gcpiu-ipython-user@gmane.org Original-Received: from scipy.org ([216.62.213.231]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1POp-0006UU-6P for gcpiu-ipython-user@gmane.org; Thu, 30 Sep 2010 22:06:39 +0200 Original-Received: from scipy.org (localhost.localdomain [127.0.0.1]) by scipy.org (Postfix) with ESMTP id 168A26E00B; Thu, 30 Sep 2010 15:06:36 -0500 (CDT) Original-Received: from hermes.ex.ac.uk (hermes.ex.ac.uk [144.173.6.31]) by scipy.org (Postfix) with ESMTP id C6D656E006 for ; Thu, 30 Sep 2010 15:06:34 -0500 (CDT) Original-Received: from host86-163-64-206.range86-163.btcentralplus.com ([86.163.64.206] helo=ax.home) by hermes.ex.ac.uk with esmtpsa (Exim 4.72/mail:587) id 1P1POa-0003Ps-49; Thu, 30 Sep 2010 21:06:24 +0100 In-Reply-To: <87ocbf5rhg.fsf@pobox.com> X-Mailer: Apple Mail (2.1081) X-BeenThere: ipython-user@scipy.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: IPython User List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ipython-user-bounces@scipy.org Errors-To: ipython-user-bounces@scipy.org Xref: news.gmane.org gmane.comp.python.ipython.user:5318 gmane.emacs.help:75047 Archived-At: Tom, > > * 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: http://www.emacswiki.org/emacs/UsingMultipleShells , but I'm afraid I haven't time right now to try it. Best, Richard Everson.