Subject: bug#71829: 31.0.50; face-remap does not work with cursor

From: Eli Zaretskii <[email-masked]>
Date: Sat, 29 Jun 2024 11:01:05 +0300

severity 71829 wishlist
thanks

> From: Aaron Jensen <[email-masked]>
> Date: Fri, 28 Jun 2024 22:12:58 -0400
> 
> 
> Neither face-remap-set-base, nor face-remap-add-relative appear to work
> with the cursor face.
> 
> (face-remap-set-base 'cursor :background "red")
> (face-remap-add-relative 'default :background "red")

The 'cursor' face is not a usual face, see its doc string.  The reason
is that cursor is drawn differently from buffer text, and is in
general much more at the control of the GUI backend.  Changing the
background color of the 'cursor' face just changes the cursor-color
parameter of the frame, and that's all; we never consul the faces when
drawing the cursor.  Thus, the face-remapping feature is not really in
effect for it, and I'm not sure it should be, given how differently
the cursor is drawn (as opposed to buffer text).

Bottom line: I don't see a bug here, perhaps a missing feature, and
personally I don't think we should provide this missing feature,
because doing so will need to resolve the non-trivial mess with
several ways we provide for changing the color of the cursor: the
face, the frame parameter, and the x-cursor-fore-pixel variable.