From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 41343@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#41343: tab-bar-mode: Close tab on mouse-2 click
Date: Fri, 06 Aug 2021 15:38:32 +0300 [thread overview]
Message-ID: <83im0iiw8n.fsf@gnu.org> (raw)
In-Reply-To: <87tuk356ia.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 06 Aug 2021 11:20:29 +0300)
> From: Juri Linkov <juri@linkov.net>
> Cc: stefankangas@gmail.com, 41343@debbugs.gnu.org
> Date: Fri, 06 Aug 2021 11:20:29 +0300
>
> >> It's too late to change how keys are implemented for tab-bar.
> >> The tab-bar keymap contains such keys as 'tab-1' and 'C-tab-2',
> >> and clicking mouse-1 on tabs emits such events. It doesn't emit
> >> 'mouse-1' and 'mouse-2'.
> >
> > How do we translate mouse clicks into the likes of C-tab-2?
>
> When mouse-1 is clicked on the close button, then the
> Control modifier 'C-' is added to the menu-item symbol tab-2
> emitted as an event.
Are you talking about handle_tab_bar_click and the processing of
TAB_BAR_EVENT in make_lispy_event? Or are there other/additional
parts to this processing?
IOW, where are the symbols like tab-2 produced?
> > And what prevents us from emitting something like tab-close-2 when
> > mouse-2 is clicked?
>
> Then mouse-2 is still hard-coded and tab-close-2 is not much different
> from the previous patch that emits C-tab-2.
>
> Or in "tab-close-2" what does "2" mean: the button number 2 (mouse-2),
> or the tab number 2 (tab-2)?
>
> Should they then cover all combinations? tab-1-mouse-1,
> tab-1-mouse-2, tab-2-mouse-1, tab-2-mouse-2, ...
I don't know, I don't think I have a clear idea of how these symbols
are produced yet, and you didn't tell enough for me to get such a
clear idea. Please tell more details, so that this discussion could
be more efficient.
> >> It should be possible to implement normal key bindings mouse-1/mouse-2,
> >> but such change will not be backward-compatible.
> >
> > In what way will it be incompatible?
>
> Currently tab-bar-make-keymap returns a keymap with menu-items.
> This is like menu-bar is implemented. The menu-bar displays
> menu-items, and clicking on them emits events with their symbols.
> The tool-bar is implemented the same way: it displays
> menu-items, and clicking emits their symbols.
> The tab-bar is exactly the same: displays menu-items
> on the tab-bar, and clicking mouse-1 emits events
> with tab names, e.g. tab-2.
>
> Users already are using such add-advice that expect
> tab-bar-make-keymap returning a keymap with menu-items.
If we find a way to produce a different symbol when mouse-2 is clicked
on a tab, there will be no incompatibility, right?
next prev parent reply other threads:[~2021-08-06 12:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-17 4:05 bug#41343: tab-bar-mode: Close tab on mouse-2 click Stefan Kangas
2020-05-17 22:12 ` Juri Linkov
2020-05-17 22:23 ` Stefan Kangas
2020-05-18 2:32 ` Eli Zaretskii
2020-05-19 21:54 ` Juri Linkov
2020-05-20 15:59 ` Eli Zaretskii
2021-08-03 22:33 ` Juri Linkov
2021-08-04 11:32 ` Eli Zaretskii
2021-08-04 20:13 ` Juri Linkov
2021-08-05 5:43 ` Eli Zaretskii
2021-08-06 0:41 ` Juri Linkov
2021-08-06 6:26 ` Eli Zaretskii
2021-08-06 8:20 ` Juri Linkov
2021-08-06 12:38 ` Eli Zaretskii [this message]
2021-08-09 7:03 ` Juri Linkov
2021-08-10 12:38 ` Eli Zaretskii
2021-08-11 7:01 ` Juri Linkov
2021-08-11 11:56 ` Eli Zaretskii
2021-08-12 8:09 ` Juri Linkov
2021-08-12 8:43 ` Eli Zaretskii
2021-08-13 7:24 ` Juri Linkov
2021-08-18 18:11 ` Juri Linkov
2021-08-24 14:37 ` Stefan Kangas
2021-09-05 17:18 ` Juri Linkov
2021-09-06 19:40 ` Stefan Kangas
2021-09-08 19:28 ` Juri Linkov
2021-09-08 21:18 ` Stefan Kangas
2021-09-14 6:43 ` Juri Linkov
2021-09-05 17:17 ` Juri Linkov
2021-08-06 16:21 ` bug#41343: [External] : " Drew Adams
2021-08-09 7:06 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83im0iiw8n.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=41343@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).