From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41343: tab-bar-mode: Close tab on mouse-2 click Date: Thu, 05 Aug 2021 08:43:46 +0300 Message-ID: <83y29gjvjh.fsf@gnu.org> References: <87wnp2cg52.fsf@linkov.net> <83tuk5la2u.fsf@gnu.org> <877dh18lj3.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39962"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41343@debbugs.gnu.org, stefankangas@gmail.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 05 07:44:13 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 1mBWAu-000AEP-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 07:44:12 +0200 Original-Received: from localhost ([::1]:45748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBWAt-000162-CS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 01:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBWAk-00015V-Lv for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 01:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBWAk-0005EH-FC for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 01:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBWAk-0006fO-AV for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 01:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2021 05:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41343 X-GNU-PR-Package: emacs Original-Received: via spool by 41343-submit@debbugs.gnu.org id=B41343.162814223925606 (code B ref 41343); Thu, 05 Aug 2021 05:44:02 +0000 Original-Received: (at 41343) by debbugs.gnu.org; 5 Aug 2021 05:43:59 +0000 Original-Received: from localhost ([127.0.0.1]:45631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWAh-0006ew-D1 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 01:43:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWAf-0006ek-FZ for 41343@debbugs.gnu.org; Thu, 05 Aug 2021 01:43:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55706) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBWAZ-00054l-87; Thu, 05 Aug 2021 01:43:51 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2881 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBWAY-0008LG-L6; Thu, 05 Aug 2021 01:43:51 -0400 In-Reply-To: <877dh18lj3.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 04 Aug 2021 23:13:12 +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:211202 Archived-At: > From: Juri Linkov > Cc: stefankangas@gmail.com, 41343@debbugs.gnu.org > Date: Wed, 04 Aug 2021 23:13:12 +0300 > > > Do we really have to hard-code the mouse button this way, including > > explicit values in C? Why is that necessary or justified? > > In tab-line.el it was very easy to bind mouse-2 to close the tab: > > (defvar tab-line-tab-map > (let ((map (make-sparse-keymap))) > (define-key map [tab-line mouse-1] 'tab-line-select-tab) > (define-key map [tab-line mouse-2] 'tab-line-close-tab) > > But it's impossible to do the same for the menu-bar and the tool-bar > and so in the tab-bar too. Why not? What prevents that? > Ot do you mean adding an integer variable that holds > a number of the mouse button used to close the tab? > For example, tab-bar-close-tab-mouse-button = 2. I think we should explore such possibilities only after we understand why normal key bindings don't work.