From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#73862: [PATCH] Add `header-line-active` and `header-line-inactive` faces. Date: Sat, 7 Dec 2024 12:13:20 -0500 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009912340628b13f5a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9951"; 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: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 07 18:15:37 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 1tJyP1-0002O7-Ec for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Dec 2024 18:15:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJyOY-00032I-KH; Sat, 07 Dec 2024 12:15: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 1tJyOV-000303-Ln for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:15: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 1tJyOV-0003Zq-5M for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:15:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:References:In-Reply-To:Mime-Version:To:Subject; bh=AUW+n01TlFiNXaOeuupKvoLOEpY6byZZ/ZMdmPzsQy4=; b=aDC4gdlOVtsNkjaY1jnlDmDK8F17VOfq4als6PK8HOCZfypEBC2MNnk2D4YGMx79ZGDZcKjPmCGNDljwxRvnkqH0YI3BR4JlYWp5dmzstTZDD4dmd2m63olSoMwMa0NNQtFLBGGX6djaragf+4r0xv3YnzTS2jZqOFW8DcGu+ItmSNVWDbho4W7jqT7+OZPIufXEONo2z9ne2WSPT7/hK9/AFQUCZEnRJf+wB8hEbeIR9ec47MOJqa7KCBcvhAqMTe59FC8dC5vWHmOPbRImlkKRQF6ETjG/xulG2cx6N8zYPFyw7Zcdp+p5QZzLkE/d/OGA+sKRraZda7Hi3hPehA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJyOU-0008Pa-R0 for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2024 17:15: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.173359167032263 (code B ref 73862); Sat, 07 Dec 2024 17:15:02 +0000 Original-Received: (at 73862) by debbugs.gnu.org; 7 Dec 2024 17:14:30 +0000 Original-Received: from localhost ([127.0.0.1]:48352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJyNx-0008OH-Qr for submit@debbugs.gnu.org; Sat, 07 Dec 2024 12:14:30 -0500 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:60756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJyNw-0008O4-4t for 73862@debbugs.gnu.org; Sat, 07 Dec 2024 12:14:28 -0500 Original-Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-3011c7b39c7so3057681fa.1 for <73862@debbugs.gnu.org>; Sat, 07 Dec 2024 09:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733591602; x=1734196402; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AUW+n01TlFiNXaOeuupKvoLOEpY6byZZ/ZMdmPzsQy4=; b=Bq7DMzR8+wm839uR/kTlzqDxd4AiGq3tuFP8HP6ktA1Mv4GF/RLgiaxjkPd8vsknLm WYRqhlS69aQHrG2rycrHv++dwy4VZJgWrM2TjNg+TLo7tQ4fllSWQpbqLXHvrWzzLKN7 5FPrLw3ohebNennnDgbLAxjjJBsZhJXQIr7oVfZEAXTyIbSuFcOnmhPmWriAjHo7AKYx vjFGCLaGvokMG1dKhUVp25E5xVLl++gk7IyjvLkj3tP1zPkLIALeTnEEaqFnU3Tfwep5 TuJmA/NtC44wS7wgpbubqM6TkDJM5+RDVxUJ/PPEIEskqrDR0MC0KIgEabspd20YIqO5 81Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733591602; x=1734196402; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AUW+n01TlFiNXaOeuupKvoLOEpY6byZZ/ZMdmPzsQy4=; b=AjGlJXXh7jlLtiHqiw4xjN0FxI3xwMSct7GfiLEe6Zlomxza6zo9yjAh2rHGTIRbkL dIS0q1Ie2Ghg08xuVAiu2ADqKAIQ/Dc6UkIruv7UR7GtOm2ec6bm1b9OSQf4Nd4d8iBc hpV2Yhq5D5gYH4+0BLAPxrRrO1yLJGnx+Nsquku+O9MVqf+Qi7aBv1iORz5A0zNc0sr8 QRA7uNkvcjcWqFr+NhaSc3qiooQkq56Erco7+d/omnOGmfbsdD/Ws9yvYhNV9GmACRZr bGrZGdzzyXAUihwP8s2GtyNrRwpup9+dCO5XOO1wVPvM6/CMXNXIg2C3ybWaUkzsI9ka QCnA== X-Forwarded-Encrypted: i=1; AJvYcCW7k8ggoRTggQjqQojqhSrFSoT+aA8AHTKQ5Fg6wYTYz4vQoCsPhifkmWRUepLV2HYEVOezKg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwqdBNcuBGNeCmCfPKcJdLgM4WqPD4u6Y5gV6zQ5zLig9Ymw3MJ p0S+O21qhU2DYWCMLWOXXOSOK5++n+YhMgrUZptYnce1VJqOmmtV/AlD4UzWfOsK8XrUKaK1kmi 1Mr9KXIonaFO420PCPp1Y9HgYwEM= X-Gm-Gg: ASbGncsC0IUT4wYuP15md7MKFiezAmGve1NQdM3Y6F9qHD0aDiD/gS2wWkTciRAOVWO WCt5JjcnFLK0bcy4dIDnh/FIWpsepA7fh5qN3SxEFiEbraLZj9EVCifh6 X-Google-Smtp-Source: AGHT+IH+1lQ4lDu6Dtn/g5mGgHhVXdaA5TTla1ksFAB740+gnxIV9CwTFb+t6y7cgFgFXNb/55ifx7sFl+nVRWZDMEc= X-Received: by 2002:a2e:be9b:0:b0:300:160f:7c76 with SMTP id 38308e7fff4ca-3002fd44fc5mr37646321fa.25.1733591601580; Sat, 07 Dec 2024 09:13:21 -0800 (PST) Original-Received: from 649336022844 named unknown by gmailapi.google.com with HTTPREST; Sat, 7 Dec 2024 12:13:21 -0500 X-Mailer: Superhuman Desktop (2024-12-02T20:06:08Z) X-Superhuman-ID: m4efnzhr.76fbec41-06fd-4a02-abe6-aee0da987733 In-Reply-To: <865xnviliv.fsf@gnu.org> X-Superhuman-Draft-ID: draft00145d7b2ca1fe1c 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:296583 Archived-At: --0000000000009912340628b13f5a Content-Type: text/plain; charset="UTF-8" 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. I'm not surprised at this point, but it's still "surprising". Given it's highly unlikely people would do something like this, one could get away with a patch like this most likely. All this change does it give the code the chance to account for remapping > of header-line-active if header-line was remapped. But if the latter > doesn't inherit from the former, that chance will not produce anything that > depends on header-line's remapping. > Ok, thanks. I can't say I understand the code yet, I'd have to study it 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. I tried to use it for https://github.com/aaronjensen/emacs-modern-tab-bar and it was a bad idea. I added hooks to set the remaps in every buffer, but once I had a child frame open or was away from the window, the remaps would not be in effect. I ended up doing it with a custom theme, which worked fine and was a better idea. So yes, technically, they "work" and if one anted to make the tab bar look different while a single buffer was selected, they could, so I retract my suggestion to make remapping not work there. Thanks, --0000000000009912340628b13f5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Dec 07, 2024 at 7:02 AM, Eli Zaretskii <eliz@gnu.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">

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 thi= s happen.

What I did see happen was if I did = this:

(custom-set-faces '(header-lin= e-active ((t (:inherit highlight)))))
(face-remap-set-base &#= 39;highlight 'default)

Then the remapping = doesn't work. I'm not surprised at this point, but it's still &= quot;surprising".=C2=A0 Given it's highly unlikely people would do= something like this, one could get away with a patch like this most likely= .

All this change does it give the code the chance to account for remapping of header-line-active if header-line was remapped. But if the latter doesn't inherit from the former, that chance will not produce anything that depends on header-line's remapping.

=

Ok, tha= nks. I can't say I understand the code yet, I'd have to study it

Tab bar mode is another one that comes to mind that probably shouldn't use remaps at all when rendering.

Why not?


<= /div>
Because it's rendered outside of a single buffer. I tried to = use it for=C2=A0https://github.com/aaronjensen/emacs-modern-tab-bar=C2=A0and it wa= s a bad idea. I added hooks to set the remaps in every buffer, but once I h= ad a child frame open or was away from the window, the remaps would not be = in effect. I ended up doing it with a custom theme, which worked fine and w= as a better idea. So yes, technically, they "work" and if one=C2= =A0anted to make the tab bar look different while a single buffer was selec= ted, they could, so I retract my suggestion to make remapping not work ther= e.=C2=A0

Thanks,
<= /body> --0000000000009912340628b13f5a--