emacs-devel
[Top][All Lists]
Advanced

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

Re: Some minor suggestions to Tab Bar


From: Juri Linkov
Subject: Re: Some minor suggestions to Tab Bar
Date: Thu, 18 Mar 2021 11:20:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Just a question. I have seen the new groups in tabs-bar, but I sadly
> don't understand what a group means and how to use this feature as a
> final user.
>
> I evaluated:
>
> (setq tab-bar-format
>       '(tab-bar-format-history
>       tab-bar-format-tabs-group
>       tab-bar-separator
>       tab-bar-format-add-tab))
>
> And just a + appears in the tab-bar. So maybe you could explain some
> basic steps about how to use the groups?

Indeed, and later this should be described in the manual once
the implementation stabilizes.

To use groups, the first step is to customize 'tab-bar-format' like you did
(with a small typo, it should be plural 'tab-bar-format-tabs-groups'):

  (setq tab-bar-format
        '(tab-bar-format-history
          tab-bar-format-tabs-groups
          tab-bar-separator
          tab-bar-format-add-tab))

Then you can either define a custom function tab-bar-tab-group-function
that automatically assigns a group name to a tab depending on the buffers
displayed in the tab.  Or much simpler is to manually set a group to
the current tab by using 'C-x t G' on every existing tab in the tab bar.

Also I recommend to customize 'tab-bar-new-tab-group' to t,
so creating a new tab will inherit its group from the previous tab
(maybe its value should be t by default?):

  (setq-default tab-bar-new-tab-group t)

When the tab bar is displayed, the main purpose of tab groups is to
hide tabs from other groups, thus giving more screen space to tabs
of the currently used group.

To some extent, tab groups could be useful even when the tab bar is
not displayed.  The command tab-close-group can be used to close
all tabs of the specified group.



reply via email to

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