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: Sat, 07 Dec 2024 20:25:38 +0200 Message-ID: <86wmgbgxjx.fsf@gnu.org> References: <86wmgfzhgc.fsf@gnu.org> <86zflay7hh.fsf@gnu.org> <86jzcey3cu.fsf@gnu.org> <8634j1n9nx.fsf@gnu.org> <86ldwrkeiy.fsf@gnu.org> <865xnviliv.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20485"; mail-complaints-to="usenet@ciao.gmane.io" Cc: trevor.m.murphy@gmail.com, me@eshelyaron.com, monnier@iro.umontreal.ca, 73862@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 07 19:26:31 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 1tJzVd-00059D-Og for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Dec 2024 19:26:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJzVL-0002UP-Tk; Sat, 07 Dec 2024 13:26:12 -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 1tJzVC-0002Tt-Qu for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 13:26:04 -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 1tJzVC-0002B3-Hv for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 13:26: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=5t1DSDVZJrIM6vooeqViFvKx5hVqc+SWVv0TDtRJA7k=; b=FQbidk0HjWiAjJE7Yt8JHYfsfraZGOOLxVV5nipI9SPcmd6qDiNql3J0ANIXbApf4NMR3qZyT1Uvam7MCOTncCR4b8DAYYvT8qUR/2dpf/QK2ljYG/+9SrOaDZfFa6wA/rJ3gdzVbh3LFazMFEHGtehpt0BALCUIJbF3xioMOz2lAH8C1aSRGSTHPedlWViPyeDZUZVrgK7aAuZAnrD9WlMD0yUoiquDX/ylLi73cQ4+6CaW3qH/tPtVoLoi2GGuaFHyUbpZ27UdAi/39doZ6lGzDcmdqCxB/w3VkOhawo6LU/PimEGitsQsCK22G3w3ACFifE4k/doteIk0DUR2CQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJzVC-0003ir-8r for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 13:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2024 18:26:02 +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.173359595114287 (code B ref 73862); Sat, 07 Dec 2024 18:26:02 +0000 Original-Received: (at 73862) by debbugs.gnu.org; 7 Dec 2024 18:25:51 +0000 Original-Received: from localhost ([127.0.0.1]:48478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJzV0-0003iM-CU for submit@debbugs.gnu.org; Sat, 07 Dec 2024 13:25:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:32958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJzUx-0003i4-Um for 73862@debbugs.gnu.org; Sat, 07 Dec 2024 13:25:49 -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 1tJzUr-00029e-7q; Sat, 07 Dec 2024 13:25:41 -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=5t1DSDVZJrIM6vooeqViFvKx5hVqc+SWVv0TDtRJA7k=; b=hC0QHiC6OARk zRam8y6BfTlf5wRPGmV484TrAsM4E4B2kXqZ+AqUBrcjuKAc/IZOEGZ8Nj15BWBaqeqY1wobITVOq R5nK8cT1cJkm2+vw1nVgxuY7v2Eg7pk+VHBOZAWJqESppF8OXa2/yHS39mfFhLUuzKWHuCKl0D/Sp xBTBWZq+O5yJO1NwOZIWxygihxTUCpSIkBh0H0C0ONTNLEluxPBGO2UUexn6iI8xOy0cj4H4G/RrJ 56rdyEIQfDAmt4lf7i5JQK1Qfq1edStdbvK1B74nnn98YF26C2KD6gmiJtgFFMuS2XR2+JE1/MYpk Ua0UC9S7Rua8V80dFPkHNg==; In-Reply-To: (message from Aaron Jensen on Sat, 7 Dec 2024 12:13:20 -0500) 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:296590 Archived-At: > From: Aaron Jensen > Date: Sat, 7 Dec 2024 12:13:20 -0500 > Cc: monnier@iro.umontreal.ca, trevor.m.murphy@gmail.com, me@eshelyaron.com, > 73862@debbugs.gnu.org > > On Sat, Dec 07, 2024 at 7:02 AM, Eli Zaretskii wrote: > > > It shouldn't. If you apply it and see something like that, it should be > > considered a bug somewhere (but I would be very surprised if it did happen). > > > > Ok, I tested it and you're right, I couldn't see this happen. > > What I did see happen was if I did this: > > (custom-set-faces '(header-line-active ((t (:inherit highlight))))) > (face-remap-set-base 'highlight 'default) > > Then the remapping doesn't work. Repeat after me: "basic faces cannot follow remapping due to face inheritance". They are called "basic" because they aren't supposed to inherit from anything, but be used to inherit _from_. The patch I posted is supposed to make Emacs be more backward-compatible, in that people who used to remap header-line will see their remapping propagate to header-line-active etc., but only as long as they inherit from header-line, which they do by default. Making header-line inherit from highlight didn't work before, and should not be expected to work now. If we install the patch I posted, I wouldn't even document this special handling of these faces, because its only purpose is to help with backward compatibility. > I'm not surprised at this point, but it's still "surprising". It had never worked! And was not supposed to work! > Given it's highly unlikely people would do something > like this, one could get away with a patch like this most likely. If people were doing something like that, they would be complaining long ago. > > Tab bar mode is another one that comes to mind that probably shouldn't use > > remaps at all when rendering. > > > > Why not? > > Because it's rendered outside of a single buffer. It doesn't have to be. It's just a face. Granted, when a face is used without relation to a buffer, then using a buffer-local customization of it (which is what face-remapping is) is not a good idea. As with many Emacs features, users shoot themselves in the foot by (ab)using the features outside of their intended design space, and then complain that things fall apart. Emacs trusts the users that they know what they are doing, although that trust is not always justified, it seems...