From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: RFC: comint.el - comint-highlight-prompt and unreadable colors Date: Mon, 26 Mar 2007 19:18:50 -0700 Message-ID: <200703270218.l2R2IoXK021694@oogie-boogie.ics.uci.edu> References: <87slbsyjn7.fsf@catnip.gol.com> <87wt14a158.fsf@pacem.orebokech.com> <20070326124509.GB23542@www.trapp.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174962088 29216 80.91.229.12 (27 Mar 2007 02:21:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2007 02:21:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 27 04:21:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HW1JK-00013a-21 for ged-emacs-devel@m.gmane.org; Tue, 27 Mar 2007 04:21:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW1Lc-0003AK-4u for ged-emacs-devel@m.gmane.org; Mon, 26 Mar 2007 21:23:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HW1LY-00036u-MJ for emacs-devel@gnu.org; Mon, 26 Mar 2007 22:23:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HW1LW-00033C-W5 for emacs-devel@gnu.org; Mon, 26 Mar 2007 22:23:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW1LW-00032o-Qd for emacs-devel@gnu.org; Mon, 26 Mar 2007 21:23:38 -0500 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HW1JD-0001q9-8B for emacs-devel@gnu.org; Mon, 26 Mar 2007 22:21:15 -0400 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id l2R2IoXK021694; Mon, 26 Mar 2007 19:18:50 -0700 (PDT) In-Reply-To: (Miles Bader's message of "Tue\, 27 Mar 2007 10\:34\:10 +0900") Original-Lines: 59 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.437, required 5, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_46 0.60, J_CHICKENPOX_56 0.60, J_CHICKENPOX_62 0.60, TW_RX 0.08) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68648 Archived-At: Miles Bader writes: > Stefan Monnier writes: > > Problem is: in terminal mode, menus are also more difficult to > > use :-( I wish PuTTY used a special TERM setting (or alternatively, I wish > > the xterm control-sequences included one which can be used to identify the > > terminal in use, and maybe even its background color). Maybe we should > > write&submit a patch to X.org (or whoever is maintaining xterm nowadays) for > > that, so that we can use it in Emacs-23. > > Yeah; someone mentioned that rxvt, while it uses TERM=xterms, defines > some extra environment variables. I just checked, and I see these: > > # black-on-white rxvt (the default) > TERM="xterms" > COLORFGBG="0;15" > COLORTERM="rxvt" > > # white-on-black rxvt (rxvt -fg white -bg black) > TERM="xterms" > COLORFGBG="15;0" > COLORTERM="rxvt" > > # green-on-black rxvt (rxvt -fg green -bg black) > TERM="xterms" > COLORFGBG="10;0" > COLORTERM="rxvt" > > Not perfect (it would be better to actually get the terminal's whole > colormap in absolute terms) but that seems enough for emacs to do a > decent job of setting up the background type at least. > > So I think Emacs could use the above information if it's present, which > will cover rxvt, Emacs does use the above information correctly (i.e. it sets the default background and the colormap) IFF TERM is set to: xterm, xterm-*, rxvt or rxvt-*. TERM=xterms is equivalent to not having any terminal initialization code in lisp/term/*.el Where does "xterms" come from? Is is a default setting on some systems, or just a user that thought it would be a good idea to set TERM to that? > and as you say, submit a patch to make xterm define the > same variables. > [An additional variable giving the whole colormap would be even nicer, > e.g.: > > COLORMAP="0:#000000,1:#ff0000,2:#00ff00,..." > > Maybe we could try to submit a patch to export that info too...] Now all the major terminal implementations support 256 colors... (luckily except rxvt, all implement the xterm color scheme for the colors 16-256)