From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Roche Newsgroups: gmane.comp.python.ipython.user,gmane.emacs.help Subject: launch/run IPython in emacs buffer Date: Thu, 30 Sep 2010 08:46:19 -0400 Message-ID: <87ocbf5rhg.fsf@pobox.com> Reply-To: help-gnu-emacs@gnu.org, ipython-user@scipy.org, Tom Roche NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1285850796 22599 80.91.229.12 (30 Sep 2010 12:46:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Sep 2010 12:46:36 +0000 (UTC) To: help-gnu-emacs@gnu.org, ipython-user@scipy.org, Original-X-From: ipython-user-bounces@scipy.org Thu Sep 30 14:46:35 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 1P1IWv-0005jb-0o for gcpiu-ipython-user@gmane.org; Thu, 30 Sep 2010 14:46:33 +0200 Original-Received: from scipy.org (localhost.localdomain [127.0.0.1]) by scipy.org (Postfix) with ESMTP id 8A4166E007; Thu, 30 Sep 2010 07:46:28 -0500 (CDT) Original-Received: from sasl.smtp.pobox.com (b-pb-sasl-quonix.pobox.com [208.72.237.35]) by scipy.org (Postfix) with ESMTP id 86A336E006 for ; Thu, 30 Sep 2010 07:46:26 -0500 (CDT) Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id ACA64CA5EB; Thu, 30 Sep 2010 08:46:25 -0400 (EDT) Original-Received: from b-pb-sasl-quonix. (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 8DFEECA5E9; Thu, 30 Sep 2010 08:46:23 -0400 (EDT) Original-Received: from tlrPanP5.pobox.com (unknown [69.134.240.67]) by b-sasl-quonix.pobox.com (Postfix) with ESMTPA id C2E0BCA5E8; Thu, 30 Sep 2010 08:46:20 -0400 (EDT) User-Agent: GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0) X-Pobox-Relay-ID: BB6295CC-CC90-11DF-9220-DDE5016DD5F0-07218935!b-pb-sasl-quonix.pobox.com 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:5316 gmane.emacs.help:75043 Archived-At: I can run IPython in an emacs buffer, but would appreciate help with either of 2 problems: 0 opening an IPython buffer "from anywhere." I can open IPython in an emacs buffer with the sequence * open buffer on a python file, e.g. C-x C-f /tmp/py.py * C-c ! This seems to work appropriately, e.g. M-p scrolls IPython history. However * 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. * I don't know of an existing command or config that does this. * I don't know enough elisp to do this. Hence I'd appreciate a pointer to an existing command or config, or some elisp (or both) that will open an IPython buffer from anywhere in emacs. 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? FWIW, I'm running Ubuntu 10.04.1 LTS, GNOME, 64-bit GNU Emacs 23.1.50.1 from ubuntu package=emacs-snapshot IPython 0.10 from ubuntu package python-mode 5.1.0 from https://launchpad.net/python-mode/ Python 2.6.5 from ubuntu package TIA, Tom Roche