Subject: bug#43396: 27.1; Customized "cursor" face has no effect in daemon mode

From: Eli Zaretskii <[email-masked]>
Date: Wed, 30 Jun 2021 15:29:36 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Teemu Likonen <[email-masked]>,  [email-masked]
> Date: Wed, 30 Jun 2021 14:14:58 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > 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. 
> 
> Yeah, it's a tricky problem...  unless we just add some brute-forcing of
> this when the first graphical frame is created.
> 
> That is, we just go through all the faces that have been created already
> (with `custom-set-faces') when the user eventually creates a frame, and
> then re-evaluate everything.

We have custom-reevaluate-setting, but I think it only works on
variables.  And we lack a mechanism that would perform re-evaluation
of faces that were customized.

> Uhm...  perhaps we could have a `custom-reset-faces' function that
> people can put in a server/client hook to achieve this if they want to?

That could be a sufficient stop-gap solution, IMO.