Subject: Re: bug#73862: [PATCH] Add `header-line-active` and `header-line-inactive` faces.

From: Eshel Yaron <[email-masked]>
Date: Sun, 08 Dec 2024 21:56:33 +0100

Hi,

Eli Zaretskii <[email-masked]> writes:

>> From: Eshel Yaron <[email-masked]>
>> Cc: [email-masked],  [email-masked],
>>   [email-masked],  [email-masked]
>> Date: Sun, 08 Dec 2024 17:29:04 +0100
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > Did you try the patch I posted, and if you did, did it resolve your
>> > original problems?  
>> 
>> I did now, and it doesn't entirely solve the problem: with this patch,
>> after remapping header-line in one buffer, the remapping now works for
>> that buffer as expected, but it still also "spreads" to other buffers,
>> which is unexpected.
>
> What do you mean by "spreads to other buffers"?  When you remapped
> header-line face before this change on master, did it behave
> differently, and if so, how?

Yes, before the introduction of header-line-(in)active, remapping
header-line buffer-locally in buffer A with face-remap-add-relative
would only affect the appearance of the header line in windows that show
buffer A.  Now, with this change and your patch, doing so can also
affect header lines in other windows, that display other buffers.

Aaron shared a recipe to reproduce this behavior, copied here:

--8<---------------cut here---------------start------------->8---
(setq header-line-format "Some header")
(face-remap-set-base 'header-line 'highlight)
(switch-to-buffer-other-window "new")
;; In new buffer/window:
(setq header-line-format "Some header")
(other-window 1)
;; In original buffer/window:
(set-face-attribute 'default nil :height (+ (face-attribute 'default :height) 10))
--8<---------------cut here---------------end--------------->8---

Eshel