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#51648: 28.0.60; `tab-bar-close-button' and `tab-bar-new-button' should be documented in the manual Date: Thu, 15 Sep 2022 19:20:39 +0300 Organization: LINKOV.NET Message-ID: <86a670ac4g.fsf@mail.linkov.net> References: <878ry0y884.fsf.ref@yahoo.com> <878ry0y884.fsf@yahoo.com> <83ee7sa17b.fsf@gnu.org> <878ry0whrm.fsf@yahoo.com> <83a6ig9zxc.fsf@gnu.org> <86h7cogg2d.fsf@mail.linkov.net> <835yt3962f.fsf@gnu.org> <864k8nrf5l.fsf@mail.linkov.net> <831r3r95bs.fsf@gnu.org> <86r1brpwh3.fsf@mail.linkov.net> <871r3rtrkr.fsf@yahoo.com> <86r1br2f6s.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10368"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , 51648@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 18:33:19 2022 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 1oYrnj-0002a2-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 18:33:19 +0200 Original-Received: from localhost ([::1]:58780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYrng-0004hC-Vm for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 12:33:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYrnU-0004ep-HH for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:33:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYrnS-0004Ps-TO for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYrnR-00070H-Ny for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:33: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: Thu, 15 Sep 2022 16:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51648 X-GNU-PR-Package: emacs Original-Received: via spool by 51648-submit@debbugs.gnu.org id=B51648.166325954526863 (code B ref 51648); Thu, 15 Sep 2022 16:33:01 +0000 Original-Received: (at 51648) by debbugs.gnu.org; 15 Sep 2022 16:32:25 +0000 Original-Received: from localhost ([127.0.0.1]:59027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYrmr-0006zD-G7 for submit@debbugs.gnu.org; Thu, 15 Sep 2022 12:32:25 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:49043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYrmq-0006yy-3q for 51648@debbugs.gnu.org; Thu, 15 Sep 2022 12:32:24 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 9B402FF809; Thu, 15 Sep 2022 16:32:15 +0000 (UTC) In-Reply-To: <86r1br2f6s.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 08 Nov 2021 11:02:19 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:242614 Archived-At: --=-=-= Content-Type: text/plain >> People generally want to customize the image, and perhaps the scale of >> that image. >> >> But I see no harm in letting people customize the whole string, if he >> wants to. > > I can't imagine how Customization UI could support customization of > such strings with text properties and images on them. Fortunately, now we have customizable icons. So I tried to do this with a patch like below, but compilation failed with this error because tab-bar.el is pre-loaded: Loading tab-bar (native compiled elisp)... Error: void-function (icons--register) (require cl-print) while preparing to dump --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=tab-bar-new-icon.patch Content-Transfer-Encoding: 8bit diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 561365bb48..5d990ac184 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -33,7 +33,8 @@ (eval-when-compile (require 'cl-lib) - (require 'seq)) + (require 'seq) + (require 'icons)) (defgroup tab-bar nil @@ -521,6 +522,17 @@ tab-bar-new-button-show (defvar tab-bar-new-button " + " "Button for creating a new tab.") +(define-icon tab-bar-new-icon nil + `((image "tabs/new.xpm" + :margin ,tab-bar-button-margin + :ascent center) + (emoji "➕") + (symbol "+") + (text " + " :face tab-bar-tab)) + "Icon for creating a new tab." + :version "29.1" + :help-echo "New tab") + (defcustom tab-bar-close-button-show t "Defines where to show the close tab button. If t, show the close tab button on all tabs. @@ -905,8 +925,8 @@ tab-bar-format-tabs-groups (defun tab-bar-format-add-tab () "Button to add a new tab." - (when (and tab-bar-new-button-show tab-bar-new-button) - `((add-tab menu-item ,tab-bar-new-button tab-bar-new-tab + (when (and tab-bar-new-button-show) + `((add-tab menu-item ,(icon-string 'tab-bar-new-icon) tab-bar-new-tab :help "New tab")))) (defun tab-bar-format-align-right () --=-=-=--