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#41343: tab-bar-mode: Close tab on mouse-2 click Date: Fri, 13 Aug 2021 10:24:32 +0300 Organization: LINKOV.NET Message-ID: <875yw9dcy7.fsf@mail.linkov.net> References: <87wnp2cg52.fsf@linkov.net> <83tuk5la2u.fsf@gnu.org> <877dh18lj3.fsf@mail.linkov.net> <83y29gjvjh.fsf@gnu.org> <8735rn8jz6.fsf@mail.linkov.net> <83sfznhywm.fsf@gnu.org> <87tuk356ia.fsf@mail.linkov.net> <83im0iiw8n.fsf@gnu.org> <877dgvkt1z.fsf@mail.linkov.net> <83wnotfpak.fsf@gnu.org> <87k0ksecbq.fsf@mail.linkov.net> <83v94cdwk5.fsf@gnu.org> <87bl6384ow.fsf@mail.linkov.net> <83zgtncasw.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="2037"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 41343@debbugs.gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 13 09:34:11 2021 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 1mERhi-0000Nf-He for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Aug 2021 09:34:10 +0200 Original-Received: from localhost ([::1]:36016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mERhg-0005Sr-OS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Aug 2021 03:34:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mERhb-0005RS-01 for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 03:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mERha-0007tn-P7 for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 03:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mERha-0002CM-EF for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 03:34:02 -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, 13 Aug 2021 07:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41343-submit@debbugs.gnu.org id=B41343.16288399828357 (code B ref 41343); Fri, 13 Aug 2021 07:34:02 +0000 Original-Received: (at 41343) by debbugs.gnu.org; 13 Aug 2021 07:33:02 +0000 Original-Received: from localhost ([127.0.0.1]:40445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mERgb-0002Af-OI for submit@debbugs.gnu.org; Fri, 13 Aug 2021 03:33:02 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:53031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mERgY-0002AO-BK for 41343@debbugs.gnu.org; Fri, 13 Aug 2021 03:33:00 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 669121C0007; Fri, 13 Aug 2021 07:32:50 +0000 (UTC) In-Reply-To: <83zgtncasw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 Aug 2021 11:43:59 +0300") 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:211720 Archived-At: >> The tab-bar could do the same, but how to support existing code >> that doesn't add text properties to the tab-bar tab captions >> in the tab-bar-format function? > > Hmm... I cannot find a function named tab-bar-format, so I don't think > I understand the question. In general, if existing code doesn't add > some text properties, how can that be a problem? 'tab-bar-format' is a variable that contains functions including 'tab-bar-format-tabs' that calls 'tab-bar--format-tab' that doesn't put special text properties on tab captions. Without text properties, it's impossible to identify the clicked tab in the command called by the click event. > If you use property names that are unlikely to conflict, I see no > problem here. These are special properties used by Emacs for internal > needs of handling the tab bar, so we can use any name that suits us. > And since all of the property names are produced by Emacs itself, we > can easily enough have a set of names without conflicts. Right? Or > what am I missing? Maybe it's not a problem to add text properties, need to test this more.