From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: how to fix IPython prompt in emacs shell mode? Date: Wed, 29 Sep 2010 21:19:36 +0200 Organization: Informatimago Message-ID: <87ocbgnyrb.fsf@kuiper.lan.informatimago.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291883839 31775 80.91.229.12 (9 Dec 2010 08:37:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 08:37:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 09:37:15 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQc02-00076e-0o for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 09:37:14 +0100 Original-Received: from localhost ([127.0.0.1]:52287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQc01-0000ss-7k for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 03:37:13 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-X-Trace: individual.net YuFMv3D6pZbxZ1nAkLeDBQ+n7MCmKUzpVYrgirUjQVbPNrmQQ6 Cancel-Lock: sha1:MDY5Njk3MTljOTlmYTE0NjNmOGE2YzZhMDc5YzcwZjU3MmRmMmJmZQ== sha1:mSCCUuh+aMt0Dxo/oSC91PO6czs= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:181553 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76879 Archived-At: Tom Roche 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 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/