help-gnu-emacs
[Top][All Lists]
Advanced

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

Using ansi-term in GNU Emacs 21?


From: Bradley M. Kuhn
Subject: Using ansi-term in GNU Emacs 21?
Date: Wed, 24 Oct 2001 15:22:18 -0400
User-agent: Mutt/1.3.23i

[ I am sending this here as I am not sure if it is a bug or not---perhaps
  I simply need a configuration change to make ansi-term work the way it
  used to in GNU Emacs 20. ]

I typically use ansi-term in GNU Emacs 20.7 to run various colorful
programs, such as mutt, or "ls --color=yes".

In GNU Emacs 21, the colors do not appear to work in ansi-term.

Here's how to reproduce the problem:

######################################################################

From the command line, I run:
emacs -q

Inside Emacs:

M-x ansi-term <RET>
/bin/bash <RET>  (when prompted for what program to run)

(Inside the new ansi-term buffer):

/bin/ls --color=yes /bin


In Emacs 20.7, the binaries all appear in green.  In Emacs 21.1, they
appear in bold, but not in color.
######################################################################

I did notice the ansi-color package in Emacs 21, and tried evaluating this
in the scratch buffer before the M-X ansi-term:

(add-hook 'terminal-mode-hook 'ansi-color-for-comint-mode-on)
(ansi-color-for-comint-mode-on)

However, this didn't work.  Once I looked at the code a bit, it was as I
expected, since ansi-color-for-color-for-comint is specific to to comint
mode, and ansi-term, while once derived long ago from comint, does not
work similarly enough for that to be effective.


So, does anyone know how to make ansi-term work with full color the way it
used to in GNU Emacs 20.7?


--
Bradley M. Kuhn, Vice President
Free Software Foundation     |  Phone: +1-617-542-5942
59 Temple Place, Suite 330   |  Fax:   +1-617-542-2652
Boston, MA 02111-1307  USA   |  Web:   http://www.gnu.org

Attachment: pgp3mfhiA7ALJ.pgp
Description: PGP signature


reply via email to

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