all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 53636@debbugs.gnu.org, tsdh@gnu.org
Subject: bug#53636: 29.0.50; face-remapping broken on master
Date: Thu, 03 Feb 2022 20:24:03 +0100	[thread overview]
Message-ID: <87wnibn48c.fsf@gnus.org> (raw)
In-Reply-To: <83mtj85tm1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Feb 2022 08:53:10 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> When you remap a face, the faces that inherit from it are affected
> only on new frames, because when we create a frame, we recompute the
> set of the basic faces for it from scratch and thoroughly.  That's
> exactly the other side of the issue which started this discussion: the
> inheriting faces on the original frame aren't affected by the
> remapping of the parent face, but those same faces on new frames are.

Right.  There's two issues here, though, and I think both of them should
be fixed (but I don't know how difficult it would be).

1) `face-map-add-relative' is supposed to be buffer-local.  But the
example shows that faces that inherit from remapped faces are affected
in other (new) frames.  (The remapped faces themselves are not
affected.)

2) Remapping these base faces behave differently from other faces, and
it'd be nice to fix that.

>> Anyway, what I was thinking of is a really simple solution: Have
>> `face-remap-add-relative' loop over all children and remap them, too.
>> (I haven't actually attempted to write something like that, though.  😀)
>
> Why not leave this to the (small number of) applications that want to
> do this?

My feeling is that all users of face remapping would want this.

Eli Zaretskii <eliz@gnu.org> writes:

>> Anyway, what I was thinking of is a really simple solution: Have
>> `face-remap-add-relative' loop over all children and remap them, too.
>
> That'd mean looping over all the known faces for each change in
> face-remapping-alist, wouldn't it?  Because we don't track which faces
> inherit from a given face, we can only tell the reverse: from which
> faces a given face inherits.

Yes, but the number of faces is pretty small, so doing this looping in
`face-map-add-relative' would not impose a significant penalty overall.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2022-02-03 19:24 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30 13:52 bug#53636: 29.0.50; face-remapping broken on master Tassilo Horn
2022-01-30 17:41 ` Lars Ingebrigtsen
2022-01-30 18:27   ` Eli Zaretskii
2022-01-30 18:31     ` Lars Ingebrigtsen
2022-01-30 19:19       ` Eli Zaretskii
2022-01-30 20:25         ` Eli Zaretskii
2022-01-30 20:28           ` Lars Ingebrigtsen
2022-01-31 12:20             ` Eli Zaretskii
2022-01-31 19:44               ` Eli Zaretskii
2022-02-01 19:38                 ` Lars Ingebrigtsen
2022-02-01 20:09                   ` Eli Zaretskii
2022-02-02 17:59                     ` Lars Ingebrigtsen
2022-02-02 18:07                       ` Eli Zaretskii
2022-02-02 19:48                         ` Lars Ingebrigtsen
2022-02-02 21:12                           ` bug#53636: [External] : " Drew Adams
2022-02-03  6:53                           ` Eli Zaretskii
2022-02-03 19:24                             ` Lars Ingebrigtsen [this message]
2022-02-03 19:53                               ` Eli Zaretskii
2022-02-05  6:20                                 ` Lars Ingebrigtsen
2022-02-05  7:50                                   ` Eli Zaretskii
2022-02-05 16:14                                     ` bug#53636: [External] : " Drew Adams
2022-02-05 22:27                                     ` Lars Ingebrigtsen
2022-02-06  7:12                                       ` Eli Zaretskii
2022-02-06 23:16                                         ` Lars Ingebrigtsen
2022-02-07 15:03                                           ` Eli Zaretskii
2022-02-08  6:08                                             ` Lars Ingebrigtsen
2022-02-08  8:58                                               ` martin rudalics
2022-02-08 12:41                                                 ` Eli Zaretskii
2022-02-08 18:24                                                   ` martin rudalics
2022-02-08 18:57                                                     ` Eli Zaretskii
2022-02-08 12:29                                               ` Eli Zaretskii
2022-02-09  8:01                                                 ` Lars Ingebrigtsen
2022-02-09 13:57                                                   ` Eli Zaretskii
2022-02-12 12:20                                                     ` Eli Zaretskii
2022-02-13  8:20                                                       ` Lars Ingebrigtsen
2022-02-13  8:31                                                         ` Tassilo Horn
2022-02-15  9:31                                                           ` Tassilo Horn
2022-02-13 11:58                                                         ` Eli Zaretskii
2022-02-14 10:38                                                           ` Lars Ingebrigtsen
2022-02-03 18:30                           ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnibn48c.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=53636@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=tsdh@gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.