From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: colors using -nw in 21.3 Date: 25 Mar 2004 09:04:47 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <4062400C.50009@usc.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1080198236 22055 80.91.224.253 (25 Mar 2004 07:03:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Mar 2004 07:03:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 25 08:03:53 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6Ou8-0005pB-00 for ; Thu, 25 Mar 2004 08:03:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6Ots-0006Od-6W for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Mar 2004 02:03:36 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B6OtJ-0006Nq-0h for help-gnu-emacs@gnu.org; Thu, 25 Mar 2004 02:03:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B6Osm-00069G-Qf for help-gnu-emacs@gnu.org; Thu, 25 Mar 2004 02:02:59 -0500 Original-Received: from [207.232.27.5] (helo=WST0054) by monty-python.gnu.org with asmtp (Exim 4.30) id 1B6Osm-00067O-BW for help-gnu-emacs@gnu.org; Thu, 25 Mar 2004 02:02:28 -0500 Original-To: help-gnu-emacs@gnu.org In-reply-to: <4062400C.50009@usc.edu> (message from KC Braunschweig on Wed, 24 Mar 2004 18:12:28 -0800) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 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 Xref: main.gmane.org gmane.emacs.help:17646 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17646 > Date: Wed, 24 Mar 2004 18:12:28 -0800 > From: KC Braunschweig > > I've recently installed emacs 21.3, compiled on Solaris 2.6 to run on > 2.6, 8 and 9 (SPARC). When running with the -nw option, color support > produces unexpected results. Our previous version (20.2.1) supported a > wide range of colors (for example $ emacs -fg DarkSlateGrey -bg wheat > -nw). The 21.3 installation seems to only support the the 8 standard > colors listed via M-x list-colors-display and selecting any other > colors, such as those in my example results in a bright green color > being used. Emacs before version 21.1 didn't support colors in -nw sessions at all. I don't know how you got colors in Emacs 20.2.1 (was that, by any chance, XEmacs?), but finding that out would be a useful first step. Perhaps the previous version used some site-specific hack to achieve that. Emacs 21.x uses the number of colors reported by the termcap/terminfo database you have on that platform. If it reports 8 colors, that is all you will see (list-colors-display shows the number of colors reported by the terminal capability database). > The man page leads me to believe that all colors listed in > /usr/lib/X11/rgb.txt should be supported. What man page is that? Anyway, to use colors on a text terminal, Emacs needs a way to issue terminal commands that switch colors. These commands are executed by the terminal device driver on your system, so only the colors supported by that driver and the terminal device you run Emacs on can be used. If you run on an xterm, the terminfo entry for that version of xterm needs to define the number of colors and commands to switch to those colors, in order for Emacs to use them.