* launch/run IPython in emacs buffer
@ 2010-09-30 12:46 Tom Roche
2010-09-30 20:06 ` Richard Everson
2010-10-01 9:30 ` Andreas Röhler
0 siblings, 2 replies; 4+ messages in thread
From: Tom Roche @ 2010-09-30 12:46 UTC (permalink / raw)
To: help-gnu-emacs, ipython-user
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 <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: launch/run IPython in emacs buffer
2010-09-30 12:46 launch/run IPython in emacs buffer Tom Roche
@ 2010-09-30 20:06 ` Richard Everson
2010-10-01 23:33 ` Tom Roche
2010-10-01 9:30 ` Andreas Röhler
1 sibling, 1 reply; 4+ messages in thread
From: Richard Everson @ 2010-09-30 20:06 UTC (permalink / raw)
To: Tom Roche; +Cc: ipython-user, help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: launch/run IPython in emacs buffer
2010-09-30 20:06 ` Richard Everson
@ 2010-10-01 23:33 ` Tom Roche
0 siblings, 0 replies; 4+ messages in thread
From: Tom Roche @ 2010-10-01 23:33 UTC (permalink / raw)
To: help-gnu-emacs, ipython-user
Tom Roche Thu, Sep 30, 2010 at 8:46 AM
>> * I'd like also to be able to open an IPython buffer from anywhere
>> (in emacs)
Richard Everson Thu, 30 Sep 2010 21:06:16 +0100
> M-x py-shell
> will get you a new (I)Python shell.
Richard: exactly what I wanted.
Pythoneers: IMHO this would be good to add to the docs, e.g.
http://ipython.scipy.org/doc/stable/html/config/initial_config.html
- This should give you full support for executing code snippets via
- IPython, opening IPython as your Python shell via C-c !, etc.
+ This should give you full support for executing code snippets via
+ IPython, opening IPython as your Python shell via C-c ! (from a
+ python-mode buffer) or M-x py-shell (from any buffer), etc.
YMMV, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: launch/run IPython in emacs buffer
2010-09-30 12:46 launch/run IPython in emacs buffer Tom Roche
2010-09-30 20:06 ` Richard Everson
@ 2010-10-01 9:30 ` Andreas Röhler
1 sibling, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2010-10-01 9:30 UTC (permalink / raw)
To: help-gnu-emacs
Am 30.09.2010 14:46, schrieb Tom Roche:
>
> 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
>
Hi,
Ipython sends code to python.
From a common emacs buffer this was done by pymacs.
Didn't try it last times.
> * 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?
interesting point.
ipython has it's own user and devel list
maybe send your request here
http://mail.scipy.org/mailman/listinfo/ipython-user
also see
http://ipython.scipy.org/moin/
resp.
http://github.com/ipython/ipython/issues
Andreas
--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/
>
> 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<Tom_Roche@pobox.com>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-01 23:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-30 12:46 launch/run IPython in emacs buffer Tom Roche
2010-09-30 20:06 ` Richard Everson
2010-10-01 23:33 ` Tom Roche
2010-10-01 9:30 ` Andreas Röhler
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.