From: Eli Zaretskii <eliz@gnu.org>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: 43396@debbugs.gnu.org, larsi@gnus.org
Subject: bug#43396: 27.1; Customized "cursor" face has no effect in daemon mode
Date: Tue, 29 Jun 2021 15:21:45 +0300 [thread overview]
Message-ID: <83k0mcoo86.fsf@gnu.org> (raw)
In-Reply-To: <878s2tltc3.fsf@iki.fi> (message from Teemu Likonen on Mon, 28 Jun 2021 21:47:24 +0300)
> From: Teemu Likonen <tlikonen@iki.fi>
> Cc: larsi@gnus.org, 43396@debbugs.gnu.org
> Date: Mon, 28 Jun 2021 21:47:24 +0300
>
> > And if, instead of custom-set-faces, you use
> >
> > (add-to-list 'default-frame-alist '(cursor-color . #0f0))
>
> That works -- using the string "#0f0". The client session now has a
> cursor with background color "#0f0".
>
> I sent my original report about "Customized 'cursor' face" after reading
> Emacs reference manual section "(emacs) Cursor Display". It says:
>
> On a graphical display, many more properties of the text cursor can be
> altered. To customize its color, change the ‘:background’ attribute of
> the face named ‘cursor’ (*note Face Customization::).
>
> It seems to me that it's a bug if customizing cursor face doesn't work.
But it does work, as you have just demonstrated. The color of the
'cursor' face does change -- except that it changes to a color that is
the closest approximation on a text-mode frame to the color you
requested. That's because the frame that is selected when the daemon
applies the customizations via custom-set-faces is the daemon frame,
which is not a GUI frame.
> It would be odd to define that a feature, so that in normal session we
> customize cursor face's background and in daemon we must use
> default-frame-alist variable instead.
custom-set-faces recalculates the face attributes and then applies
those attributes to the frame(s). I don't know how to defer that
recalculation to some future time, when a GUI frame is available,
without hurting more important use cases with face customizations,
which generally need such an immediate recalculation of attributes.
Yes, we have a design bug here (and in some other places):
customizations that need GUI features don't work well when invoked at
startup time in daemon sessions. If someone knows how to fix
custom-set-faces so that the face is re-evaluated when the first GUI
frame is created, patches and/or ideas are welcome. Failing that, I
thought I was doing well by helping you resolve this issue in your
init files...
next prev parent reply other threads:[~2021-06-29 12:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 13:23 bug#43396: 27.1; Customized "cursor" face has no effect in daemon mode Teemu Likonen
2020-09-14 15:33 ` Eli Zaretskii
2020-09-14 15:58 ` Teemu Likonen
2021-06-12 12:22 ` Lars Ingebrigtsen
2021-06-12 12:47 ` Eli Zaretskii
2021-06-13 7:56 ` Eli Zaretskii
2021-06-28 10:09 ` Teemu Likonen
2021-06-28 11:54 ` Eli Zaretskii
2021-06-28 12:51 ` Teemu Likonen
2021-06-28 14:53 ` Eli Zaretskii
2021-06-28 17:07 ` Teemu Likonen
2021-06-28 17:24 ` Eli Zaretskii
2021-06-28 18:47 ` Teemu Likonen
2021-06-29 12:21 ` Eli Zaretskii [this message]
2021-06-29 13:38 ` Teemu Likonen
2021-06-30 12:14 ` Lars Ingebrigtsen
2021-06-30 12:29 ` Eli Zaretskii
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=83k0mcoo86.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=43396@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=tlikonen@iki.fi \
/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).