From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73862: [PATCH] Add `header-line-active` and `header-line-inactive` faces. Date: Wed, 04 Dec 2024 15:49:23 +0200 Message-ID: <86wmgfzhgc.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29192"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73862@debbugs.gnu.org To: Aaron Jensen , Trevor Murphy , Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 04 14:50:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIpls-0007Nh-Dl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 14:50:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIplY-0006ik-CA; Wed, 04 Dec 2024 08:50:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIplV-0006iS-BG for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 08:50:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIplV-0001L6-0m for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 08:50:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=tcwqxifgoVelkLwpneyrv1zS1DVxT8nfhpPPosw5hdA=; b=kjTmp8SqJpBB8Bjwj9GrjwmbNpMN0jzuG1UanjlLpWVf39OyjxtyObZbTgV/S8Op4IvouIV2hkT4C5mP6TdgoXnH/ysJLJoso6CHwkbYsvEFpzLS0k79hnyGl9j1lUVD3q4HhFbBrokpeSLC25/0e8ARJzcSl40irrnDM4qnnun3Lzsy13LaMmo4vNfdCAtR9OuYMwcg84acH61nmlaIFBSW4E8H/XVKJnyIqmrv14UTMp4mKgtsxx4Zh3SGRna5Aq6Z2SBT9yJsdvyYegwcY4YpfA6iEFNOQtjTHT1UAbHvYwl2WjvLFL4KZRtJS068zNJZhE4BZJ1rhUlO6yWsww==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIplT-0002LE-KC for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 08:50:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Dec 2024 13:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73862 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73862-submit@debbugs.gnu.org id=B73862.17333201878964 (code B ref 73862); Wed, 04 Dec 2024 13:50:03 +0000 Original-Received: (at 73862) by debbugs.gnu.org; 4 Dec 2024 13:49:47 +0000 Original-Received: from localhost ([127.0.0.1]:34718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIpl9-0002KP-0V for submit@debbugs.gnu.org; Wed, 04 Dec 2024 08:49:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIpkz-0002K1-HK for 73862@debbugs.gnu.org; Wed, 04 Dec 2024 08:49:39 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIpkt-0001I3-3U; Wed, 04 Dec 2024 08:49:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tcwqxifgoVelkLwpneyrv1zS1DVxT8nfhpPPosw5hdA=; b=f7bM2usiWffx w2gVL4S8ER2H0EwnQ2IwweK5YUyXfsmS2pLShS/eyCCmxgqA7xGJSyBow0Wz4VPamL51s4W67QBVN b+F5vbX3TOwqGb5T552SAKnHbqqNNi16WM6ywLT/tJ50DJTBDgSBwJqv0qRIESWQt4zAS+jgwuJ3x KZ/eNqc9+IrjU2Ahxt67CjolFidij7zEy4x14LuPmt2c/YBsBXBDTYBG3asJbcXhmlhlI9ilNILpG nPQGyLddRvsid3pgCBdmVswnIxLjU1Eqoj8KZCBXjwh8uYBaQWUtpodI6UDfj9wst5ck3NaT+0GaM bSBocLmFmRxCo8JxilcZ4g==; In-Reply-To: (message from Aaron Jensen on Tue, 3 Dec 2024 22:30:58 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296412 Archived-At: > From: Aaron Jensen > 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 > Cc: Trevor Murphy > 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?