From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71883: [PATCH] Fix tab-bar-auto-width with customized tab-bar-tab-face-function Date: Tue, 20 Aug 2024 00:11:33 -0700 Message-ID: <87seuzekii.fsf@breatheoutbreathe.in> 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> <865xt1lw66.fsf@mail.linkov.net> <87ikwttk96.fsf@breatheoutbreathe.in> <861q3h47ci.fsf@gnu.org> <87a5i5dqmd.fsf@breatheoutbreathe.in> <86plqmqgpa.fsf@mail.linkov.net> <87ed6xanny.fsf@breatheoutbreathe.in> <86o75o30ye.fsf@mail.linkov.net> <87ttfgc6ag.fsf@breatheoutbreathe.in> <86jzgb4ttl.fsf@mail.linkov.net> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2205"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam@alphapapa.net, 71883@debbugs.gnu.org, Eli Zaretskii , shipmints@gmail.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 20 09:12:43 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 1sgJ2o-0000PD-MM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Aug 2024 09:12:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgJ2U-0000gj-Qg; Tue, 20 Aug 2024 03:12:23 -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 1sgJ2S-0000gZ-6v for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 03:12:20 -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 1sgJ2R-0000rB-6P for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 03:12:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=BxF/pZbq8zEB8ihY3cB0j3zwZshaIzoFW5zeU7CgLtI=; b=SDE6Do2NYVSmQzg0k8chOPPPS+WbpmX+N0QM4SqDYwGRNRepDVvG/DAcOKDVC9U9eLheRzTiUI650nIzQ6XWMZsG92OrmbRWiS80DFqCrRPerfHbhFOngqZcZTAm0ppo//eIM5Ozar4MUxNCAQLlBIyxzrtKSED/TShwOQ+j99kdBtP7JtQnUYMh8nf5veS22zoRj3rL35TFp5NsZnzOM5rG0+92P+ZQQiZKqpe/Sznh7IsCL1lJCy69hgLjeOEhpIHOehKCgMsL4A5eP9jjyH3Y992lVoHyHdh1AWLlcQFPXtGOHrZfVw/5voJMvcbeMahIXRM/buBzuqdvsutsrA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sgJ37-0000Ad-Js for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 03:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Aug 2024 07:13: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.1724137979645 (code B ref 71883); Tue, 20 Aug 2024 07:13:01 +0000 Original-Received: (at 71883) by debbugs.gnu.org; 20 Aug 2024 07:12:59 +0000 Original-Received: from localhost ([127.0.0.1]:59715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgJ34-0000AL-KZ for submit@debbugs.gnu.org; Tue, 20 Aug 2024 03:12:58 -0400 Original-Received: from out-187.mta0.migadu.com ([91.218.175.187]:22828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgJ32-0000A4-HS for 71883@debbugs.gnu.org; Tue, 20 Aug 2024 03:12:57 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1724137897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BxF/pZbq8zEB8ihY3cB0j3zwZshaIzoFW5zeU7CgLtI=; b=M8SU3DthNGWiV2lOAEPfv1IOyVnuU0S5Q5GKA8LFYbRwAQY7rpYiBcW2g3m0dPv0XHlEUg 3/V0m2tJBBDedEufSl4fN9LfsjO5YXuAveUFWlIKZo4KSAYN9lqgQxChHMA+pLsMveKQv7 nkD+5GDMhynbWAH6Mj2iEHRYBXtM6qU= In-Reply-To: <86jzgb4ttl.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 20 Aug 2024 09:40:38 +0300") X-Migadu-Flow: FLOW_OUT 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:290427 Archived-At: Juri Linkov writes: >>>>>> +(defun tab-bar-auto-width-predicate-default (item) >>>>>> + "Accepts tab ITEM and returns non-nil for tabs and tab groups." >>>>>> + (string-match-p >>>>>> + ;; (rx bos (or "current-tab" "current-group" "tab-" "group-")) >>>>>> + "\\`\\(?:current-\\(?:group\\|tab\\)\\|\\(?:group\\|tab\\)-\\)" >>>>>> + (symbol-name (nth 0 item)))) >>>>> >>>>> In this part please remove the current group from the default implementation, >>>>> because it looks too ugly, and it was not resized before this change, since >>>>> tab-bar-auto-width-faces didn't contain the tab-bar-tab-group-current face. >>>> >>>> If the simpler change offers feature parity, that sounds good to me. >>> >>> Thanks for the patch, I pushed it to master, then ameliorated it >>> to keep backwards-compatibility for users customized these faces, >>> but by default using your predicate on symbols. >> >> Thank you! How would users have customized tab-bar-auto-width-faces >> since it was not a defcustom? > > I meant that customized it without using the Customization UI. > Maybe a better word would be "configured", e.g. with 'setopt' > ('setopt' supports non-customizable plain variables as > 'setq' does, unlike 'set-variable' that refuses to change them). I see. Thank you!