From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#71883: [PATCH] Fix tab-bar-auto-width with customized tab-bar-tab-face-function Date: Fri, 19 Jul 2024 09:42:41 +0300 Organization: LINKOV.NET Message-ID: <865xt1lw66.fsf@mail.linkov.net> References: <87le2kaloz.fsf@breatheoutbreathe.in> <861q4ce1yb.fsf@mail.linkov.net> <877ce3damx.fsf@breatheoutbreathe.in> <86r0cb7l58.fsf@mail.linkov.net> <5aff3095-087f-493d-9251-8048b51280f9@alphapapa.net> <86msmzc7ne.fsf@mail.linkov.net> <86o77dox54.fsf@mail.linkov.net> <87a5ihgii9.fsf@breatheoutbreathe.in> <86jzhkgtb7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24271"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: adam@alphapapa.net, 71883@debbugs.gnu.org, shipmints@gmail.com, Joseph Turner To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 19 17:19:40 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 1sUpOU-00065Q-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Jul 2024 17:19:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUpNx-0000Xb-Qq; Fri, 19 Jul 2024 11:19:05 -0400 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 1sUpNv-0000QI-AG for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 11:19:03 -0400 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 1sUpNv-000149-1v for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 11:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUpNt-0001DD-P2 for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2024 11:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2024 15:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71883-submit@debbugs.gnu.org id=B71883.17214023084617 (code B ref 71883); Fri, 19 Jul 2024 15:19:01 +0000 Original-Received: (at 71883) by debbugs.gnu.org; 19 Jul 2024 15:18:28 +0000 Original-Received: from localhost ([127.0.0.1]:50197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUpNM-0001CO-Br for submit@debbugs.gnu.org; Fri, 19 Jul 2024 11:18:28 -0400 Original-Received: from mslow1.mail.gandi.net ([217.70.178.240]:33967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUpNK-0001CE-0t for 71883@debbugs.gnu.org; Fri, 19 Jul 2024 11:18:26 -0400 Original-Received: from relay9-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::229]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 74071C2C28 for <71883@debbugs.gnu.org>; Fri, 19 Jul 2024 06:56:02 +0000 (UTC) Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id E2098FF802; Fri, 19 Jul 2024 06:55:55 +0000 (UTC) In-Reply-To: <86jzhkgtb7.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Jul 2024 14:18:52 +0300") X-GND-Sasl: juri@linkov.net 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:288984 Archived-At: >> Please see the attached patches, where the first three commits are >> intended to be applied to the emacs-30 branch, and the final commit >> removes the obsolete `tab-bar-auto-width-faces' on master. Thanks for the patches, although I agree with Eli that the changes on emacs-30 should be minimal. > I'm not sure I understand why they need to be installed on emacs-30. > Is this a regression in Emacs 29 or Emacs 30? What bad things will > happen if we install the changes on master instead> Replacing hard-coded logic with customizable variable for external packages like activities.el is needed as soon as possible on emacs-30 because hard-coded logic hinders the use of packages. However, there is no hurry to change the default behavior to match a symbol name instead of checking face names. Therefore I think better to move the existing code (memq (get-text-property 0 'face (nth 2 item)) tab-bar-auto-width-faces) to the new predicate function on emacs-30. Then activities.el can change it to another function that matches a symbol. Then on master the default body on the new predicate could be replaced from checking the face to match a symbol. Also changes in tab-bar--format-tab-group should be on master as well. >> Does this change warrant a NEWS entry? > > Yes, since you are adding a hook variable. Obsolescence of a variable > also requires a NEWS entry. Then addition of tab-bar-auto-width-functions requires a NEWS entry on emacs-30. And obsolescence of tab-bar-auto-width-faces requires a NEWS entry on master. >> * lisp/tab-bar.el (tab-bar-auto-width-faces): Remove. >> (tab-bar-auto-width): Only run tab-bar-auto-width-functions. > > We don't usually remove a variable one major release after it has been > obsoleted. It's too soon. Indeed, it could be obsoleted on master. This will provide a minimal set of changes on emacs-30.