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 12:44:52 +0300 Message-ID: <83y1yxdffv.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20888"; 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 11:53:15 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 1nrcqI-0005G6-Ce for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 11:53:14 +0200 Original-Received: from localhost ([::1]:54428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrcqH-0008H7-BW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 05:53:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrcjL-0002nW-RZ for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 05:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrcjL-0001le-HG for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 05:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrcjK-0007E0-Fa for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 05:46:02 -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 09:46:02 +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.165295351327693 (code B ref 32921); Thu, 19 May 2022 09:46:02 +0000 Original-Received: (at 32921) by debbugs.gnu.org; 19 May 2022 09:45:13 +0000 Original-Received: from localhost ([127.0.0.1]:34511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrciO-0007CH-6J for submit@debbugs.gnu.org; Thu, 19 May 2022 05:45:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrciL-0007BT-Ux for 32921@debbugs.gnu.org; Thu, 19 May 2022 05:45:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrciG-0001Qk-H4; Thu, 19 May 2022 05:44:56 -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=egBBEAom73OD5MytIwlP9S87w/pu/KSU6GKUOv442h0=; b=rKuIs+z+/wZH gQiFZuJ6el1Wf81JcwYceCCGJHQfz5M5+63PxfiKlZ+yhkCuWykyBdvZLuUjuexazrQQOMQ0OqRHZ 977etzfY3b2rXcWb6QoBkUD796DMM1NwhzwVp4mZ3wd9wdj9jMXWbu1eKD6J9j4W93uQn+i/dekS9 9W1GLt5aWJ2MHUhodP61erL5On15KCKtENZIrVjh898PmXJv2WdTvt+p0SZmIYv/UR+BBXYEgXPdC 05eedca2aDHidUvks4AmxJk9V3WIcDbqq3WP7qUB+A9fmGs+QcA6gZySeqxJ/jnphkzX2/eL+zvre 59lEJFFjhxWK3095RdVW+w==; Original-Received: from [87.69.77.57] (port=1508 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 1nrciG-000800-0J; Thu, 19 May 2022 05:44:56 -0400 In-Reply-To: <87fsl5sxse.fsf@yahoo.com> (message from Po Lu on Thu, 19 May 2022 16:59:29 +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:232634 Archived-At: > From: Po Lu > Cc: larsi@gnus.org, 32921@debbugs.gnu.org, jimis@gmx.net > Date: Thu, 19 May 2022 16:59:29 +0800 > > Eli Zaretskii writes: > > > We may be miscommunicating. The offending code in x-win.el is called > > at startup, only once, and sets up default-frame-alist for all the > > future frames, including those on displays this Emacs session did not > > yet open and knows nothing about. How would you define > > default-frame-alist that is specific to those as-yet-unknown displays? > > I would leave it empty. That means we stop supporting X resources, more or less. > > And if you are saying that the code in x-win.el should only affect the > > display on which Emacs was started, then that would be an even more > > seriously breaking change. Why should we assume that the user > > intended his/her X resources to be only honored on the (random) > > display where Emacs shows its first frame? The files ~/.Xresources > > and ~/.Xdefaults are not specific to any display, AFAIU, they are > > global for the user. Right? > > Emacs _never_ honored any other X resource that happened to be on the > first display for every display, and I have a feeling this code was a > mistake left over from the refactoring of `x-win.el' when multi-TTY was > developed. 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? > Emacs, like all other X programs, takes resources from several different > sources: > > - The system's locale-specific X resources. This is normally empty on > modern systems. > > - The user's personal X resource files for Emacs. This is also mostly > empty on modern systems. > > - The user's X defaults that were loaded into the X server. Only if > the no X resources were loaded into the X server will Emacs try to > load them itself from ~/.Xdefaults. > > - The environment defaults. Also empty on modern systems. > > This is why X resources are typically specific to each X server, which > is also why Emacs keeps a different resource database for each display > connection, and does not try to apply resources (other than > `reverseVideo') from one display connection to another. 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. 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?