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: colours in client on xterm (if an X frame is open at same time) Date: Sun, 10 Jan 2010 00:49:53 -0800 (PST) Message-ID: <201001100849.o0A8nrDE009786@godzilla.ics.uci.edu> 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> <838wc7af0e.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263113612 8239 80.91.229.12 (10 Jan 2010 08:53:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jan 2010 08:53:32 +0000 (UTC) Cc: ulm@gentoo.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 10 09:53:24 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 1NTtY3-00070e-Pv for ged-emacs-devel@m.gmane.org; Sun, 10 Jan 2010 09:53:24 +0100 Original-Received: from localhost ([127.0.0.1]:45088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTtY4-0006Ve-7v for ged-emacs-devel@m.gmane.org; Sun, 10 Jan 2010 03:53:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTtXx-0006V4-3V for emacs-devel@gnu.org; Sun, 10 Jan 2010 03:53:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTtXs-0006Rt-2B for emacs-devel@gnu.org; Sun, 10 Jan 2010 03:53:16 -0500 Original-Received: from [199.232.76.173] (port=33697 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTtXr-0006Rf-Qn for emacs-devel@gnu.org; Sun, 10 Jan 2010 03:53:11 -0500 Original-Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:56165) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NTtXm-0000K6-G0; Sun, 10 Jan 2010 03:53:07 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o0A8nrmA007388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 Jan 2010 00:49:54 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o0A8nrDE009786; Sun, 10 Jan 2010 00:49:53 -0800 (PST) In-Reply-To: <838wc7af0e.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Jan 2010 09:55:45 +0200") Original-Lines: 43 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o0A8nrmA007388 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:119776 Archived-At: Eli Zaretskii writes: > > 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? No, the background mode is computed just fine, and it's light (the default for xterm anyway). > 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. In the case where everything works correctly (before the patch), when stepping through frame-set-background-mode (called by tty-set-up-initial-frame-faces) the default face gets set up wrong. So debugging hurts in this case :-(