all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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; 3+ 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] 3+ messages in thread

* 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; 3+ 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] 3+ 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; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2010-09-29 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.0.1285786269.6342.help-gnu-emacs@gnu.org>
2010-09-29 19:19 ` how to fix IPython prompt in emacs shell mode? Pascal J. Bourguignon
2010-09-29 18:50 Tom Roche
2010-09-29 19:28 ` [IPython-User] " Andrew Wilson
2010-09-29 19:43   ` Tom Roche

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.