emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some minor suggestions to Tab Bar


From: Gabriel
Subject: Some minor suggestions to Tab Bar
Date: Sun, 14 Mar 2021 19:51:23 -0300

Tab Bar is awesome and the recently added features to work with tab
groups made it even better. I know it's still a working in progress, but
I would like to suggest some minor improvements:

1. Add an initial input for the 'completing-read' of
'tab-bar-change-tab-group', so when we type 'C-x t G' to set/unset the
group name, the minibuffer contents is filled with the current group
value. A possible downside is that pressing TAB may not show the
Completions list, in case the current value does not match any item of
the completion list provided.

2. Add new faces for group tabs. The idea is to differentiate these 2
cases:
  2.1. Tabs from the current group X tabs from other groups
  2.2. Regular tabs X collapsed group tabs

This is the default appearance:

PNG image

It's not possible to know which tabs belongs to the current group or
which tabs represent another group, since all inactive tabs use the same
face 'tab-bar-tab-inactive'. I did a slight modification to
'tab-bar-tab-name-format-default' and 'tab-bar-tab-group-format-default'
to add two new faces:

PNG image

In the example above (please desconsider the styles I used), we can see
that:
  * [1], [2] and [8] are tabs that do not belong to any group (ungrouped)
  * [3] is a collapsed group tab of a group named "group1", where tab
    [4] belongs to the same group and is hidden
  * [5] and [7] are tabs that belongs to the current group (same group)
  * [6] is the current active tab

3. Add a new user option to set a default group for new tabs
('tab-line-new-tab-default-group'). When nil, the behavior is the same
of today where new tabs are ungrouped. If a string, new tabs are
assigned automatically to that group. If a function, it's called to
return the group name for the new tab. The "initial tab" is also
affected, so after setting this new user option and enabling
'tab-bar-mode', the first tab and subsequent new tabs will be assigned
to the default group.

4. Today, the group name is not copied when 'tab-bar-duplicate-tab' is
called, so the user needs to type 'C-x t n' to duplicate the tab and
'C-x t G' to set the same group name of the tab it was duplicated
from. It would be nice if 'tab-bar-duplicate-tab' could also duplicate
the group name.

5. When I first played around with tab bar groups, I created several
tabs and assigned groups to them in a non sequential order, e.g.:

 [1 group1 AAA] [2 group1 BBB] [3 CCC] [4 group1 DDD] [5 group2 EEE]

Then I noticed a "strange" behavior and thought this feature was not
working properly. After adjusting the group order so all tabs of the
same group are next to each other (e.g., setting group1 to tab 3 or
removing group1 from tab 4), it worked as expected. I don't know "if" or
"how" this specific case of non sequential group tabs should be handled,
but that's something we could clarify in the documentation.

If someone find these ideas useful, I can send patches.

Regards,
Gabriel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]