unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: 32921@debbugs.gnu.org, larsi@gnus.org, jimis@gmx.net
Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw
Date: Thu, 19 May 2022 15:40:58 +0300	[thread overview]
Message-ID: <83sfp5d7ad.fsf@gnu.org> (raw)
In-Reply-To: <87czg93juo.fsf@yahoo.com> (message from Po Lu on Thu, 19 May 2022 18:19:43 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: larsi@gnus.org,  32921@debbugs.gnu.org,  jimis@gmx.net
> Date: Thu, 19 May 2022 18:19:43 +0800
> 
> Eli Zaretskii <eliz@gnu.org> 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.





  reply	other threads:[~2022-05-19 12:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:49 bug#32921: emacsclient obeys Xresources even when launched with -nw Dimitrios Apostolou
2022-05-18 12:38 ` Lars Ingebrigtsen
2022-05-18 13:02   ` Eli Zaretskii
2022-05-18 13:13     ` Lars Ingebrigtsen
2022-05-18 13:27       ` Eli Zaretskii
2022-05-18 13:52         ` Lars Ingebrigtsen
2022-05-18 14:00           ` Eli Zaretskii
2022-05-19 22:58             ` Lars Ingebrigtsen
2022-05-19  1:37           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19  7:02             ` Eli Zaretskii
2022-05-19  7:47               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19  8:26                 ` Eli Zaretskii
2022-05-19  8:59                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19  9:44                     ` Eli Zaretskii
2022-05-19 10:19                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 12:40                         ` Eli Zaretskii [this message]
2022-05-19 13:09                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 13:23                             ` Eli Zaretskii
2022-05-19 13:40                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 13:55                                 ` Eli Zaretskii
2022-05-20  1:04                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20  7:03                                     ` Eli Zaretskii
2022-05-20  8:15                                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 23:04                   ` Lars Ingebrigtsen
2022-05-20  6:54                     ` Eli Zaretskii
2022-05-20  8:19                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 10:50                         ` Eli Zaretskii
2022-05-20  8:28                       ` Lars Ingebrigtsen
2022-05-20 11:00                         ` Eli Zaretskii
2022-05-20 11:30                           ` Lars Ingebrigtsen
2022-06-19 13:28   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sfp5d7ad.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32921@debbugs.gnu.org \
    --cc=jimis@gmx.net \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).