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: Thu, 05 Dec 2024 09:51:29 +0200 Message-ID: <86jzcey3cu.fsf@gnu.org> References: <86wmgfzhgc.fsf@gnu.org> <86zflay7hh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: trevor.m.murphy@gmail.com, me@eshelyaron.com, 73862@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 05 08:52:27 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 1tJ6ew-00062f-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Dec 2024 08:52:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJ6ec-00023T-BY; Thu, 05 Dec 2024 02:52:06 -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 1tJ6eY-00023J-EI for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 02:52:03 -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 1tJ6eY-0002vW-5o for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 02:52:02 -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=HP8XsURPtYWz4mZD/AjtQA+aKNcxtn6qQKp77dSoq6c=; b=rU+qP/efOtSpWPaobWi5Spvap0qZ3zz2Bj8Lrsm+pOVuKPpEpSzo4+zVXsqSEf7WlobeWsJKZNFxogtJ73fiXSZsjnhNDw8vNW7t90Oo0xe2VmWxHqFCD7IH0qz2HlhToIoJijXzD6/7U4xWn4XKp4V/SSh1O9dPO9avJQJbGNmLGaYHfcg9YOc2RhdgPwExn4xyoFMoT7A8KdamdrZdSMfHevhxM8E+OUkRCmrjqM8zhJxvsKkjSEoMTyam8qQ+F4umwXY7FwwO8GI0a+exzr64auyWVMKeaEap5XhGi6i74h0u/xAAN2LEcxErNkVgJKkJfJDTV8/lbFAdTT0D9Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJ6eX-0005vR-Tr for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 02:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Dec 2024 07:52:01 +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.173338510222742 (code B ref 73862); Thu, 05 Dec 2024 07:52:01 +0000 Original-Received: (at 73862) by debbugs.gnu.org; 5 Dec 2024 07:51:42 +0000 Original-Received: from localhost ([127.0.0.1]:38020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ6eD-0005uk-JV for submit@debbugs.gnu.org; Thu, 05 Dec 2024 02:51:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ6eA-0005uN-Tl for 73862@debbugs.gnu.org; Thu, 05 Dec 2024 02:51: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 1tJ6e5-0001ri-8q; Thu, 05 Dec 2024 02:51:33 -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=HP8XsURPtYWz4mZD/AjtQA+aKNcxtn6qQKp77dSoq6c=; b=GLuxKkn2kRyn MI9BHwL4TH+inEdU+SHPnO178TRwQ90Ya28Zihkw+dELXGzi2Gw/KQT+nW1rwmHgwCWGrAHFc0V1b S8ZYBJgtxqBTzlmel3oMAzsAVU2T77ZMX8OuMqZkwye2o4ln8lv5UeJPfjRkouCF3xrPsRq3hyeSW FgHMc/UKznZxdLs+F5owCOw7gWq7b3BvgpOSOEjJTe10j75r243jCyuqrN+MG3jcfBLTbZGNEtC3S ABx47Pw2gcO50j+Mq7d5PfoYiJ6UGdCvTBrTvaDnVu2RTafeD1zWSe+LnKgCKniWFB4PUTSjGFq0j SF1sMVgua806fewyamzhtw==; In-Reply-To: (message from Aaron Jensen on Wed, 4 Dec 2024 23:29:32 -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:296453 Archived-At: > From: Aaron Jensen > Date: Wed, 4 Dec 2024 23:29:32 -0800 > Cc: trevor.m.murphy@gmail.com, me@eshelyaron.com, 73862@debbugs.gnu.org > > Furthermore, this problem only happens *once* per Emacs session. After that, I cannot seem to > reproduce it again until I restart Emacs. All of this points to a bug, in my opinion unless header-line is > considered deprecated or somehow falls into a realm of not being able to remap for some reason. > > This may be obvious to you all, and me going much further probably isn't realistic, but I am curious if there's > a problem in the resolving of inherited remapped faces while changing windows. Specifically that it appears > to use the lack of remap in the newly created window to resolve the remap in the original window. The > remapping of the active/inactive faces happens explicitly inside display_mode_line / init_iterator with an > explicit window reference. I don't know enough to know where the inherited faces get remapped, but if the > window used to remap them is incorrect (because it's the current window, rather than the window the > mode/header line is being drawn in), I could see there being the issue we're observing. > > Not sure if that helps, but that's as far as I was able to get in my investigation so far. Once again, please show some simple Lisp to reproduce the phenomena you are observing. It is hard to discuss these highly technical issues on this abstract level. On the very basic level of the display code, when a display iterator is initialized, the window for whose display the iterator is used must be given to init_iterator as its argument, and the buffer of that window must be temporarily made to be the current buffer. So this cannot be the problem in this case. If init_iterator would be passed an incorrect window, we'd have much more grave display problems than this minor issue.