From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 32921@debbugs.gnu.org, jimis@gmx.net
Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw
Date: Wed, 18 May 2022 16:27:56 +0300 [thread overview]
Message-ID: <834k1nezs3.fsf@gnu.org> (raw)
In-Reply-To: <875ym3c7bj.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 18 May 2022 15:13:20 +0200)
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: jimis@gmx.net, 32921@debbugs.gnu.org
> Date: Wed, 18 May 2022 15:13:20 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Which sequence of calls ends up calling x-handle-reverse-video, and
> > what is the trigger for that sequence of calls?
>
> It's:
>
> Debugger entered: nil
> x-handle-reverse-video(#<frame GNU Emacs at xo 0x55a6e4722360> ((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars)))
> x-create-frame-with-faces(((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars)))
> #f(compiled-function (params) #<bytecode -0x1d5f77f46341f751>)(((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars)))
> apply(#f(compiled-function (params) #<bytecode -0x1d5f77f46341f751>) ((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars)))
> frame-creation-function(((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars)))
> make-frame()
So the difference is between (a) taking notice of the reverseVideo
resource at startup timer as opposed to (b) at frame creation time, is
that right? If so, I think this might affect the use case whereby
someone changes the X resources after Emacs has already started, or
something?
> > (These kinds of changes in code that was there for decades give me the
> > creeps.)
>
> Indeed. I tried to do some VC history spelunking for why we're
> apparently checking reverseVideo redundantly in this way, but I came up
> short.
Maybe it would be safer to add a special frame-parameter which will
record the fact that some parameters came from X resources, and will
then refrain from applying those parameters to TTY frames? Or maybe
we should have some other special construct in default-frame-alist
that prevents some parameters from being applied to TTY frames?
Because I think reverseVideo is just one example of such parameters.
> It might not be redundant on Windows, which presumably doesn't call
> these X functions, but does heed reverseVideo in the w32 version of
> window-system-initialization.
Yes, we emulate X resources using the Registry on MS-Windows (although
I think this is largely unknown and unused).
next prev parent reply other threads:[~2022-05-18 13:27 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 [this message]
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
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=834k1nezs3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=32921@debbugs.gnu.org \
--cc=jimis@gmx.net \
--cc=larsi@gnus.org \
/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).