Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw

From: Eli Zaretskii <[email-masked]>
Date: Thu, 19 May 2022 11:26:15 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 19 May 2022 15:47:00 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > It cannot be terminal-local, I think, because we want it to be in
> > effect for future terminals as well.
> 
> But why?  Under X, the resource database loaded by Emacs is normally
> specific to each display.  (Emacs only loads the users X resource file
> manually if it was never previously loaded into the X server.)  I think
> what the code in x-win.el does means that only one display's
> `reverseVideo' resource will be respected at any given time, while each
> display's X resources are documented to only apply to frames created on
> that display.

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?

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?