swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs and ls


From: Alex Lancaster
Subject: Re: Emacs and ls
Date: 20 Apr 2000 18:19:21 -0600
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6

>>>>> "PJ" == Paul Johnson <address@hidden> writes:

[...]

PJ> I have color coded ls set in my environment.  WHen I do ls in
PJ> Emacs's shell, I get ugly stuff like this: Calculator.o
PJ> Makefile~ ObserverSwarm.m core
PJ> ChangeLog Market.h ObserverSwarm.o
PJ> main.m Competition.h Market.m
PJ> Parameters.h main.o Competition.m
PJ> Market.o Parameters.m

Try setting your alias of `ls' to `ls --color=auto' (see below).

PJ> My prompt, which also has color coding, looks terrible in Emacs
PJ> shell:

PJ> ]0;<pauljohn>:
PJ> 
/tmp/benedikt/comp-current(ddress@hidden;32m)-(06:19pm
PJ> Thu Apr
PJ> 20)-(comp-current)
PJ> $ 

At some point emacs is going to switch to implementing font-locking
and faces to be independent of X11, and thus you'll be able to use
font-lock (and get colour-coding) on a console which supports colour
without having to boot into X, which will be great for folks running
old laptops, with small amounts of memory, or for those times that you
just don't want to have to boot into X to do some useful coding!  

You can currently only do this in ViM - (Vi iMproved), to my
knowledge.  (I personally think that the ability to do as much useful
work on the Linux virtual consoles as you would in X is one of the
strengths of GNU/Linux that DOS/Windows could never beat.  With emacs,
lynx, bash and friends it's possible to do just that).

I had heard a rumour this was going to be in emacs 20.6, but it's not
there yet.  Does anybody know when FSF was going to incorporate this
code?

PJ> ansi-term solves this, but only in Unix. It does not exist in
PJ> Windows Emacs

Does TERM=ansi, rather than TERM=ansi-term work?

PJ> Furthermore, I don't understand why the default Swarm setup does
PJ> not cause this problem in the shell too because it has color=auto.

The key is the `auto' keyword.  This means that `ls' is smart enough
to only try using colours if it can (i.e. if the TERM environment
variable is one that supports colour coding) and don't use them if it
doesn't.

Alex
-- 
Alex Lancaster * address@hidden * www.santafe.edu/~alex * 505 984-8800 x242
Santa Fe Institute (www.santafe.edu) & Swarm Development Group (www.swarm.org)

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]