From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lorenzo Isella" Newsgroups: gmane.emacs.help Subject: Re: Emacs Shell Ansi Colors Date: Mon, 29 Sep 2008 12:48:53 +0200 Message-ID: References: <48DFDAB9.5020506@gmail.com> <87prmo3r45.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1222685968 10858 80.91.229.12 (29 Sep 2008 10:59:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Sep 2008 10:59:28 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Thierry Volpiatto To: "Peter Dyballa" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 29 13:00:25 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 1KkGUK-00068S-LX for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Sep 2008 13:00:24 +0200 Original-Received: from localhost ([127.0.0.1]:40455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkGTH-0008BO-Mf for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Sep 2008 06:59:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkGJL-0003eG-ER for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 06:49:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkGJE-0003ci-UW for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 06:48:59 -0400 Original-Received: from [199.232.76.173] (port=59143 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkGJD-0003cN-7C for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 06:48:55 -0400 Original-Received: from nf-out-0910.google.com ([64.233.182.187]:47186) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkGJC-0002vu-PF for help-gnu-emacs@gnu.org; Mon, 29 Sep 2008 06:48:55 -0400 Original-Received: by nf-out-0910.google.com with SMTP id c7so702720nfi.26 for ; Mon, 29 Sep 2008 03:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=7s+y2RvJxZ1R0hPVq+mlawZOmfq2qQihOgkbuhmJJ60=; b=qMHheuU9r8vPnsxAhBwqha6sLOP+rXvic6prSbZcUR5s6T952eaHhmQRvx6uhujaUw G+D801ud3B9t03K/5XX7wSBIyUxRQP9aEWznp+zsfoyCQJ7J3lKrk2AcSeLLDaP/klOg 5VfJjIbYWq3hUFonBsRTP5FEIWpB1/QsPP79c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=BVdL74YXZcVH7Lvj6wDWWSUJPqBcKgD73ySgvHxLj+bWdCk/DgTS0HbdNa8m8LqEDl fg2h4TI9hm6vJPgFEOkXD7TsKxlzzN7SkOqKkHRkmboKXkPShDhHoBr9sI7OFYV789Lj rETufnwC42eUAmM6Gm2qU8TQ75y0/U8lqd7CQ= Original-Received: by 10.210.75.6 with SMTP id x6mr6016622eba.169.1222685333778; Mon, 29 Sep 2008 03:48:53 -0700 (PDT) Original-Received: by 10.210.11.3 with HTTP; Mon, 29 Sep 2008 03:48:53 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-Google-Sender-Auth: 6f4f014d097b90b1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58176 Archived-At: 2008/9/29 Peter Dyballa : > > Am 28.09.2008 um 23:19 schrieb Thierry Volpiatto: > >> ,---- >> | (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) >> | (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) >> `---- > > > For me > > (ansi-color-for-comint-mode-on) > > is enough ... > > -- > Greetings > > Pete > > There's no place like ~ > =96 (UNIX Guru) > > > > Hi, And thanks for your suggestions. I am puzzled since I gave both a try (actually one of them is precisely the same recommendation from the wiki page), but the problem stays the same. >From the web http://www.emacswiki.org/cgi-bin/wiki/ansi-color.el I read ;;; Commentary: ;; This file provides a function that takes a string or a region ;; containing Select Graphic Rendition (SGR) control sequences (formerly ;; known as ANSI escape sequences) and tries to translate these into ;; faces. ;; ;; This allows you to run ls --color=3Dyes in shell-mode. In order to ;; test this, proceed as follows: ;; ;; 1. start a shell: M-x shell ;; 2. load this file: M-x load-library RET ansi-color RET ;; 3. activate ansi-color: M-x ansi-color-for-comint-mode-on ;; 4. test ls --color=3Dyes in the *shell* buffer ;; ;; Note that starting your shell from within Emacs might set the TERM ;; environment variable. The new setting might disable the output of ;; SGR control sequences. Using ls --color=3Dyes forces ls to produce ;; these. ;; ;; If you decide you like this, add the following to your .emacs file: ;; ;; (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) ;; (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) So it looks like there could be a problem with the TERM environment variable (but do not ask me what this stands for). I suppose (hope?) this is a one-liner for somebody really knowledgeable about emacs. Kind Regards Lorenzo