From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuan Luo Newsgroups: gmane.emacs.help Subject: Re: customizing dircolors doesn't take effect in emacs shell Date: Sun, 15 Jan 2012 17:34:35 -0500 Message-ID: References: <3CD4DC10-DEDB-4DB7-ADEB-38166A9E88C0@web.de> <9358B31E-D0DF-478E-A0BF-3B7721A43F81@web.de> <14CA6C8F-B82D-4FD4-B6E9-4344B31B5E2F@web.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001517592326d6192204b698b3ae X-Trace: dough.gmane.org 1326666888 15874 80.91.229.12 (15 Jan 2012 22:34:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Jan 2012 22:34:48 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 15 23:34:44 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RmYey-0007Ow-8z for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Jan 2012 23:34:44 +0100 Original-Received: from localhost ([::1]:60598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmYex-0001hd-Fa for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Jan 2012 17:34:43 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmYes-0001hN-6e for help-gnu-emacs@gnu.org; Sun, 15 Jan 2012 17:34:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmYeq-0001QJ-V9 for help-gnu-emacs@gnu.org; Sun, 15 Jan 2012 17:34:38 -0500 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:44800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmYeq-0001QD-L7 for help-gnu-emacs@gnu.org; Sun, 15 Jan 2012 17:34:36 -0500 Original-Received: by bkuw5 with SMTP id w5so4356962bku.0 for ; Sun, 15 Jan 2012 14:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ChMnFb94038iz1/WiK66tQ+tJNLq+dJpdnmhxaJwovM=; b=SpoPTCniTiuVQB20t+Kyuk0KE5XArJnhirWwS8g1Jm34YNpHQqaQMhid41W/PbH+rn Uu5yCQtB/s9vhssMKemfyRVtdiGoc9VpCpVseDkcsmOdGdZF8z5bxBlvCVAF2ERZxgP/ 0ynMCQPKGVO4RBbEYB3wWde7f85S4yUWl+moI= Original-Received: by 10.204.155.150 with SMTP id s22mr3762761bkw.140.1326666875279; Sun, 15 Jan 2012 14:34:35 -0800 (PST) Original-Received: by 10.205.83.135 with HTTP; Sun, 15 Jan 2012 14:34:35 -0800 (PST) In-Reply-To: <14CA6C8F-B82D-4FD4-B6E9-4344B31B5E2F@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83513 Archived-At: --001517592326d6192204b698b3ae Content-Type: text/plain; charset=ISO-8859-1 I found the solution: adding a line TERM=dumb in the ~/.dircolors file did the trick, as emacs inferior mode shell type is dumb. Thanks for all the help getting me close to the answer! Best, Yuan On Mon, Jan 9, 2012 at 3:56 PM, Peter Dyballa wrote: > > Am 9.1.2012 um 17:43 schrieb Yuan Luo: > > > All aliases in ~/.bashrc are listed in emacs shells. > > I already had have ansi-color-for-comint-mode-on set. > > execution of ls traces to /bin/ls > > Does it work when you use > > /bin/ls --color=auto /bin > /bin/ls --color /bin > > manually and directly? > > My manual page explains: > > With --color=auto, ls emits color codes only when standard output > is connected to a terminal. The LS_COLORS environment variable can change > the settings. Use the dircolors command to set it. > > There is a chance that LS_COLORS hinders ls, it's also possible that in > *shell* buffer standard output is not connected to a terminal. The latter > seems to be true for me on Mac OS X (10.6.8, Snow Leopard). So by omitting > the "=auto" should make your aliases work. > > -- > Greetings > > Pete > > Bake pizza not war! > > --001517592326d6192204b698b3ae Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I found the solution:
adding a line TERM=3Ddumb in the ~/.dircolors file= did the trick, as emacs inferior mode shell type is dumb.

Thanks fo= r all the help getting me close to the answer!

Best,
Yuan

On Mon, Jan 9, 2012 at 3:56 PM, Peter Dyballa <Peter_Dyballa@w= eb.de> wrote:

Am 9.1.2012 um 17:43 schrieb Yuan Luo:

> All aliases in ~/.bashrc are listed in emacs shells.
> I already had have ansi-color-for-comint-mode-on set.
> execution of ls traces to /bin/ls

Does it work when you use

=A0 =A0 =A0 =A0/bin/ls --color=3Dauto /bin
=A0 =A0 =A0 =A0/bin/ls --color /bin

manually and directly?

My manual page explains:

=A0 =A0 =A0 =A0With --color=3Dauto, ls emits color codes only when standar= d output is connected to a terminal. The LS_COLORS environment variable can= change the settings. Use the dircolors command to set it.

There is a chance that LS_COLORS hinders ls, it's also possible that in= *shell* buffer standard output is not connected to a terminal. The latter = seems to be true for me on Mac OS X (10.6.8, Snow Leopard). So by omitting = the "=3Dauto" should make your aliases work.

--
Greetings

=A0Pete

Bake pizza not war!


--001517592326d6192204b698b3ae--