all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: how to fix IPython prompt in emacs shell mode?
Date: Wed, 29 Sep 2010 21:19:36 +0200	[thread overview]
Message-ID: <87ocbgnyrb.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: mailman.0.1285786269.6342.help-gnu-emacs@gnu.org

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/


       reply	other threads:[~2010-09-29 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.0.1285786269.6342.help-gnu-emacs@gnu.org>
2010-09-29 19:19 ` Pascal J. Bourguignon [this message]
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

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=87ocbgnyrb.fsf@kuiper.lan.informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.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.