GNU bug report logs - #73862
[PATCH] Add `header-line-active` and `header-line-inactive` faces.

Previous Next

Package: emacs;

Reported by: trevor.m.murphy <at> gmail.com

Date: Fri, 18 Oct 2024 12:58:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Aaron Jensen <aaronjensen <at> gmail.com>, Trevor Murphy <trevor.m.murphy <at> gmail.com>, Eshel Yaron <me <at> eshelyaron.com>
Cc: 73862 <at> debbugs.gnu.org
Subject: bug#73862: [PATCH] Add `header-line-active` and `header-line-inactive` faces.
Date: Wed, 04 Dec 2024 15:49:23 +0200
> From: Aaron Jensen <aaronjensen <at> gmail.com>
> Date: Tue, 3 Dec 2024 22:30:58 -0800

Aaron, it would have been more useful to CC Trevor, who is the author
of that changeset.  I've added him now.

> I'm able to reproduce this with the mode-line as well, so it appears that there may be a bug there too in the
> code that was copied to implement the active/inactive faces in the header line. It's entirely possible that
> there's a bug in nano-modeline, but it seems suspect that code was added to consider windows and now this
> issue triggers when new windows are created (and possibly when selection changes, I haven't eliminated
> whether or not that's a factor yet).

You were able to reproduce what?  I don't think you posted a recipe to
reproduce the problem.  Please do, if at all possible, preferably
starting from "emacs -Q".

> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: Trevor Murphy <trevor.m.murphy <at> gmail.com>
> Date: Wed, 04 Dec 2024 10:47:18 +0100
> 
> >     Add new `header-line-active' and `header-line-inactive' faces
> >     
> >     This is all intended to parallel the 'mode-line-active' and
> >     'mode-line-inactive' distinction.
> [...]
> 
> This seems to introduce a regression, consider the following recipe:
> 
> 1. emacs -Q
> 2. In the scratch buffer, evaluate:
>    (setq header-line-format "foobar")
>    (face-remap-add-relative 'header-line 'highlight)

Aren't you supposed to remap the two new faces instead of
'header-line'?

> 3. Type C-x C-M-= or something similar to force updating the header
>    line.  The header line in the scratch buffer now shows "foobar" and
>    uses the highlight face, as expected
> 4. Type C-x 4 b new RET to switch to another buffer in another window
> 5. In the new buffer evaluate (setq header-line-format "foobar")
> 6. Observe that the header line in the new buffer is also using the
>    highlight face.  That's unexpected!
> 7. Type C-x C-M-= while the new buffer is current
> 8. Observe that the header lines in both windows no longer have the
>    highlight face.  That's unexpected!
> 
> Before, remapping the header-line face with face-remap-add-relative
> would only affect the current buffer, as expected.  Now it seems like
> the face remapping "leaks" between buffers/windows somehow...

Trevor, could you please look into this?




This bug report was last modified 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.