* how to fix IPython prompt in emacs shell mode?
@ 2010-09-29 18:50 Tom Roche
2010-09-29 19:28 ` [IPython-User] " Andrew Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Tom Roche @ 2010-09-29 18:50 UTC (permalink / raw)
To: help-gnu-emacs, ipython-user
When, in emacs, I do
M-x shell
ipython
everything seems to work, except that the prompt is
^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m
How to get the normal ipython prompt, or close facsimile? Or is there
a better way to run ipython interactively in an emacs buffer? FWIW,
I've got
Ubuntu 10.04.1 LTS, GNOME, 64-bit
GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)
ipython 0.10 from ubuntu package
python-mode 5.1.0 from https://launchpad.net/python-mode/
TIA, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [IPython-User] how to fix IPython prompt in emacs shell mode?
2010-09-29 18:50 how to fix IPython prompt in emacs shell mode? Tom Roche
@ 2010-09-29 19:28 ` Andrew Wilson
2010-09-29 19:43 ` Tom Roche
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Wilson @ 2010-09-29 19:28 UTC (permalink / raw)
To: help-gnu-emacs, ipython-user, Tom Roche
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
On Wed, Sep 29, 2010 at 1:50 PM, Tom Roche <Tom_Roche@pobox.com> wrote:
>
> When, in emacs, I do
>
> M-x shell
> ipython
>
> everything seems to work, except that the prompt is
>
> ^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m
>
> How to get the normal ipython prompt, or close facsimile?
Try this:
(setq ansi-color-for-comint-mode t)
* from
http://ipython.scipy.org/doc/rel-0.9.1/html/config/initial_config.html
Or is there a better way to run ipython interactively in an emacs buffer?
ipython.el is pretty good - it has the niceties of python-mode, but with
ipython as the py-shell interpreter (for example, C-c C-c in a python code
buffer executes that code in your ipython buffer).
I think ipython.el is distributed with ipython, but you can also grab a copy
at: http://ipython.scipy.org/dist/ipython.el
[-- Attachment #2: Type: text/html, Size: 1592 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to fix IPython prompt in emacs shell mode?
2010-09-29 19:28 ` [IPython-User] " Andrew Wilson
@ 2010-09-29 19:43 ` Tom Roche
0 siblings, 0 replies; 4+ messages in thread
From: Tom Roche @ 2010-09-29 19:43 UTC (permalink / raw)
To: help-gnu-emacs, ipython-user
Tom Roche Wed, Sep 29, 2010 at 1:50 PM
>> When, in emacs, I do
>> M-x shell
>> ipython
>> everything seems to work, except that the prompt is
>> ^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m
Andrew Wilson Wed, 29 Sep 2010 14:28:19 -0500
> (setq ansi-color-for-comint-mode t)
Thanks! solved that problem. I'll post separately regarding some other
issues running ipython from emacs.
your assistance is appreciated, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.0.1285786269.6342.help-gnu-emacs@gnu.org>]
* Re: how to fix IPython prompt in emacs shell mode?
[not found] <mailman.0.1285786269.6342.help-gnu-emacs@gnu.org>
@ 2010-09-29 19:19 ` Pascal J. Bourguignon
0 siblings, 0 replies; 4+ messages in thread
From: Pascal J. Bourguignon @ 2010-09-29 19:19 UTC (permalink / raw)
To: help-gnu-emacs
Tom Roche <Tom_Roche@pobox.com> writes:
> When, in emacs, I do
>
> M-x shell
> ipython
>
> everything seems to work, except that the prompt is
>
> ^[[0;32mIn [^[[1;32m1^[[0;32m]: ^[[0m
>
> How to get the normal ipython prompt, or close facsimile? Or is there
> a better way to run ipython interactively in an emacs buffer? FWIW,
> I've got
>
> Ubuntu 10.04.1 LTS, GNOME, 64-bit
> GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)
> ipython 0.10 from ubuntu package
> python-mode 5.1.0 from https://launchpad.net/python-mode/
>
> TIA, Tom Roche <Tom_Roche@pobox.com>
These are ansi escape codes to set color. You can tell the emacs shell
to interpret them with M-x ansi-color-for-comint-mode-on RET
You may add it on shell-mode-hook:
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
Notice that this works for any comint based mode.
--
__Pascal Bourguignon__ http://www.informatimago.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-29 19:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 18:50 how to fix IPython prompt in emacs shell mode? Tom Roche
2010-09-29 19:28 ` [IPython-User] " Andrew Wilson
2010-09-29 19:43 ` Tom Roche
[not found] <mailman.0.1285786269.6342.help-gnu-emacs@gnu.org>
2010-09-29 19:19 ` Pascal J. Bourguignon
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.