From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Emacs Shell Ansi Colors Date: Mon, 29 Sep 2008 18:08:55 +0200 Message-ID: <114A14BA-F010-4EE3-A12D-B3F06F698196@Web.DE> References: <48DFDAB9.5020506@gmail.com> <87prmo3r45.fsf@tux.homenetwork> <87abdr9l3v.fsf@gmail.com> <1222695407.550370@arno.fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1222704851 12494 80.91.229.12 (29 Sep 2008 16:14:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Sep 2008 16:14:11 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andreas Politz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 29 18:15:09 2008 connect(): Connection refused 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.50) id 1KkLNN-000447-3F for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Sep 2008 18:13:33 +0200 Original-Received: from localhost ([127.0.0.1]:42183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkLMK-0000Mz-8H for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Sep 2008 12:12:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkLLr-0000Ln-7G for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 12:11:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkLLp-0000Kz-Iv for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 12:11:58 -0400 Original-Received: from [199.232.76.173] (port=46199 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkLLp-0000Ku-FD for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 12:11:57 -0400 Original-Received: from fmmailgate01.web.de ([217.72.192.221]:38344) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkLIy-0001OV-Un for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 12:09:01 -0400 Original-Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id 218FBF254992; Mon, 29 Sep 2008 18:08:58 +0200 (CEST) Original-Received: from [91.35.213.202] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.109 #226) id 1KkLIv-0003Io-00; Mon, 29 Sep 2008 18:08:58 +0200 In-Reply-To: <1222695407.550370@arno.fh-trier.de> X-Mailer: Apple Mail (2.753.1) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX1/yXh1cnSJezW0nPkx+n7yhWjfUM43wRXqu/iJP L0tSOJDGUTLPCvuL4/myX8iLTyLbFSWfVjCAofp6TXx6VWFAXZ AEGZUGMNnKDp3VfAEm6g== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:58195 Archived-At: Am 29.09.2008 um 15:32 schrieb Andreas Politz: > Leave your .emacs as it is and create a file '~/.emacs_bash', insert > the following lines, save and you should have colors. > > PS1=3D'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033=20 > [00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ > eval "`dircolors -b`" > alias ls=3D'ls --color=3Dauto' This is only bash code =96 don't you think you need to prepare GNU =20 Emacs to *execute* the ANSI codes GNU ls will be emitting? This is =20 true for my GNU Emacs 22.3. Your example of a shell prompt can cause =20 problems in *shell* buffer =96 such a prompt is not easy to find, which =20= means that older commands also are not easy to find or recognised. =20 You can customise instead the variable comint-highlight-prompt. There are also other versions of ls around that for example make =20 colourisation depending on terminal capabilities. Anyway, it's good =20 to know that a file ~/.emacs_ exists that can be =20 used to setup *shell* buffer, for example switch off what's working =20 in xterm or such. Or switch on. -- Mit friedvollen Gr=FC=DFen Pete <] o __o |__ o HPV, the real ___o /I -\<, |o \ -\),-% high speed! ___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________