From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: colours in client on xterm (if an X frame is open at same time) Date: Sat, 09 Jan 2010 09:55:45 +0200 Message-ID: <838wc7af0e.fsf@gnu.org> References: <19270.28051.401596.689093@a1i15.kph.uni-mainz.de> <201001072358.o07NwL1e006325@godzilla.ics.uci.edu> <19270.54295.87807.81836@a1i15.kph.uni-mainz.de> <201001080713.o087DpNv021759@godzilla.ics.uci.edu> <19271.23938.742044.640825@a1i15.kph.uni-mainz.de> <201001081828.o08ISZgT016268@godzilla.ics.uci.edu> <201001090418.o094Iw6d007997@godzilla.ics.uci.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1263023792 5529 80.91.229.12 (9 Jan 2010 07:56:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2010 07:56:32 +0000 (UTC) Cc: ulm@gentoo.org, emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 09 08:56:25 2010 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 1NTWBM-0002Uw-Ja for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2010 08:56:24 +0100 Original-Received: from localhost ([127.0.0.1]:55725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTWBN-0002vt-20 for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2010 02:56:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTWBG-0002vm-UM for emacs-devel@gnu.org; Sat, 09 Jan 2010 02:56:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTWBB-0002va-AT for emacs-devel@gnu.org; Sat, 09 Jan 2010 02:56:17 -0500 Original-Received: from [199.232.76.173] (port=39987 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTWBB-0002vX-2n for emacs-devel@gnu.org; Sat, 09 Jan 2010 02:56:13 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:49388) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NTWBA-0004wL-GQ for emacs-devel@gnu.org; Sat, 09 Jan 2010 02:56:12 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTWB9-0006BI-F4 for emacs-devel@gnu.org; Sat, 09 Jan 2010 02:56:11 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KVY00900Z8N8L00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 09 Jan 2010 09:55:12 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.222.44]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KVY005UFZBZE0R0@a-mtaout22.012.net.il>; Sat, 09 Jan 2010 09:55:12 +0200 (IST) In-reply-to: <201001090418.o094Iw6d007997@godzilla.ics.uci.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by mx20.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:119751 Archived-At: > Date: Fri, 8 Jan 2010 20:18:58 -0800 (PST) > From: Dan Nicolaescu > Cc: emacs-devel@gnu.org > > > In your case the only effect that patch should have is to move the call > > (tty-set-up-initial-frame-faces) from before > > > > (let ((coding-system-for-read 'binary) > > > > to after it. > > If I put back the `tty-set-up-initial-frame-faces' call (after > `xterm-register-default-colors') and make current > `tty-set-up-initial-frame-faces' conditional on detecting a dark > background, then everything seems to work OK. > > Calling `tty-set-up-initial-frame-faces' twice in the dark background > case is very ugly, but in case nobody finds a better solution soon I'll > check in that change soon. I wasn't following this thread. I don't know if I can help, but there's something I don't understand: is it the case that the new code mis-computes the background reported by xterm? That is, it sets up for a dark background when it is in fact light? Or is the background mode computed correctly, but the call to tty-set-up-initial-frame-faces in its new location does not do what it's expected to do? If the latter, then I'd step through tty-set-up-initial-frame-faces to see what goes wrong there. I see that it calls frame-set-background-mode, so perhaps the problem is within that function. (Sorry, I don't have access to an xterm to try all this myself.)