From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: RFC: comint.el - comint-highlight-prompt and unreadable colors Date: Tue, 27 Mar 2007 10:34:10 +0900 Organization: NEC Electronics Message-ID: 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 1174959281 17497 80.91.229.12 (27 Mar 2007 01:34:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2007 01:34:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 27 03:34:34 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 1HW0a1-0003O5-4m for ged-emacs-devel@m.gmane.org; Tue, 27 Mar 2007 03:34:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW0cJ-0007fh-Eh for ged-emacs-devel@m.gmane.org; Mon, 26 Mar 2007 20:36:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HW0cG-0007fb-7Q for emacs-devel@gnu.org; Mon, 26 Mar 2007 21:36:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HW0cD-0007fP-MF for emacs-devel@gnu.org; Mon, 26 Mar 2007 21:36:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW0cD-0007fM-Hu for emacs-devel@gnu.org; Mon, 26 Mar 2007 20:36:49 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HW0Zu-0001wL-6v for emacs-devel@gnu.org; Mon, 26 Mar 2007 21:34:26 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HW0Zp-0006b9-HI for emacs-devel@gnu.org; Tue, 27 Mar 2007 03:34:21 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Mar 2007 03:34:21 +0200 Original-Received: from miles.bader by fencepost.gnu.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Mar 2007 03:34:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: fencepost.gnu.org System-Type: i686-pc-linux-gnu Blat: Foop Cancel-Lock: sha1:n58+ckn9k/epYgFW5fJVrqEt9mY= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:68646 Archived-At: 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, 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...] -Miles -- I'm beginning to think that life is just one long Yoko Ono album; no rhyme or reason, just a lot of incoherent shrieks and then it's over. --Ian Wolff