GNU bug report logs - #41343
tab-bar-mode: Close tab on mouse-2 click

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Sun, 17 May 2020 04:06:02 UTC

Severity: wishlist

Tags: fixed, patch

Merged with 41342

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 41343 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: bug#41343: tab-bar-mode: Close tab on mouse-2 click
Date: Fri, 13 Aug 2021 10:24:32 +0300
>> 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.




This bug report was last modified 3 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.