From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw Date: Thu, 19 May 2022 15:40:58 +0300 Message-ID: <83sfp5d7ad.fsf@gnu.org> References: <87o7zvc8xi.fsf@gnus.org> <835ym3f0xt.fsf@gnu.org> <875ym3c7bj.fsf@gnus.org> <834k1nezs3.fsf@gnu.org> <87ee0raqy2.fsf@gnus.org> <87czgal2tt.fsf@yahoo.com> <838rqydmy8.fsf@gnu.org> <878rqyklqj.fsf@yahoo.com> <831qwqdj2w.fsf@gnu.org> <87fsl5sxse.fsf@yahoo.com> <83y1yxdffv.fsf@gnu.org> <87czg93juo.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17988"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 32921@debbugs.gnu.org, larsi@gnus.org, jimis@gmx.net To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 19 14:48:38 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrfa2-0004UI-3J for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 14:48:38 +0200 Original-Received: from localhost ([::1]:55046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrfa0-0001Q1-OA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 08:48:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrfTe-0000JR-FC for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 08:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrfTd-0006De-OE for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 08:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrfTd-000865-Md for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 08:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 May 2022 12:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32921 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 32921-submit@debbugs.gnu.org id=B32921.165296406931048 (code B ref 32921); Thu, 19 May 2022 12:42:01 +0000 Original-Received: (at 32921) by debbugs.gnu.org; 19 May 2022 12:41:09 +0000 Original-Received: from localhost ([127.0.0.1]:34752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrfSn-00084h-Ft for submit@debbugs.gnu.org; Thu, 19 May 2022 08:41:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrfSm-00084V-9f for 32921@debbugs.gnu.org; Thu, 19 May 2022 08:41:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrfSg-00065E-SH; Thu, 19 May 2022 08:41:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qaX2E4ObZVtqBaoRMnnb2GYZoBjViLeUpHS3qf1PHEI=; b=Q9A1Lpwe9fU/ sqD7Pz+uWHAcC05OqY0Z1rzpg+Gw4wdZxmem2iHCXI9bLsh8MUQsIdnQA/sUxh7W3jGOdxxrdj6Q3 dEUt1tMs4HRcyBIONQgydHh+8iNAhm9LENKpfrUOp5rlPW47IMt33oSFjLiQGw814AAMwo8TM7RwK bCDEfKApVUtbHLoHFuAQQqM1ThoN3dqImheoWQ4VAd2VYOzaSUfzTlijOaNCL/m5qyONE6XJPWJBa WzXjRA/iriM42a62AxlVP4yz28H+cVNEZX3Cp3U2bWSpKiAhscm2frJYB9+5ZbQJZ402egz+7Fnye gXsxgfF+WiKsR+KxscAPUQ==; Original-Received: from [87.69.77.57] (port=4302 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrfSf-0006hd-RR; Thu, 19 May 2022 08:41:02 -0400 In-Reply-To: <87czg93juo.fsf@yahoo.com> (message from Po Lu on Thu, 19 May 2022 18:19:43 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232640 Archived-At: > From: Po Lu > Cc: larsi@gnus.org, 32921@debbugs.gnu.org, jimis@gmx.net > Date: Thu, 19 May 2022 18:19:43 +0800 > > Eli Zaretskii writes: > > > How do you mean "never"? We have here the code in x-win.el which does > > that and is very old, so "never" doesn't seem to be a good description > > of the situation. And multi-TTY support has nothing to do with > > multiple X displays. AFAIU, you suggested to take the X resources > > into consideration only for the first X display on which Emacs opens > > its first frame. What does this have to do with multi-TTY? > > No, I suggested to take the value of Emacs.reverseVideo of each display > (yes, they are different between different displays) into account only > for frames created that display. We already do that, see the information and the backtrace posted by Lars a while ago. The code in x-win.el does something beyond that: it caters for people who have X resources specified on their user-private files, and want those settings to be in effect on all displays. (And besides, what is the chance that someone will want different values of reverseVideo on different displays? I think the chances for that are nil.) > > This is completely irrelevant. We supported X resources in Emacs > > forever, and I see no reason to unsupport them now. We need to > > discuss this under the assumption that ~/.Xresources and ~/.Xdefaults > > will continue to have the same effect on Emacs as they did before, at > > least optionally if not by default. Thus, suggestions to toss that > > support are non-starters from where I stand. > > Why? Because we will otherwise break a long-standing behavior. > My point was that X resources in Emacs are loaded from the X > server, and as such reverseVideo could be different from one display to > the other. This works fine with frame parameters that are set with > gui_default_parameter, since that calls gui_display_get_resource with > the dpyinfo the frame is on. However, the existing code applies the > value of reverseVideo of the first display to all frames, even those > created on subsequently opened displays, which means the `reverse' frame > parameter of those frames will not match the value of Emacs.reverseVideo > on any display other than the first display that was created. People who want Emacs to behave like you describe can simply remove this setting from their ~/.Xdefaults. > > What about the suggestion to have specially-named frame parameters in > > default-frame-alist, which are defined from X resources and only > > applied to GUI frames? > > That would work incorrectly if Emacs was connected to two different X > servers, each with different values of reverseVideo. Not necessarily, because frame-parameters applied by gui_default_parameter could override those we took from ~/.Xdefaults.