all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Everson <R.M.Everson@exeter.ac.uk>
To: Tom Roche <Tom_Roche@pobox.com>
Cc: ipython-user@scipy.org, help-gnu-emacs@gnu.org
Subject: Re: launch/run IPython in emacs buffer
Date: Thu, 30 Sep 2010 21:06:16 +0100	[thread overview]
Message-ID: <87340DF3-7703-46B1-AE86-9F4F05747520@exeter.ac.uk> (raw)
In-Reply-To: <87ocbf5rhg.fsf@pobox.com>


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.

  reply	other threads:[~2010-09-30 20:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 12:46 launch/run IPython in emacs buffer Tom Roche
2010-09-30 20:06 ` Richard Everson [this message]
2010-10-01 23:33   ` Tom Roche
2010-10-01  9:30 ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87340DF3-7703-46B1-AE86-9F4F05747520@exeter.ac.uk \
    --to=r.m.everson@exeter.ac.uk \
    --cc=Tom_Roche@pobox.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ipython-user@scipy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.