unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Gabriel <gabriel376@hotmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Some minor suggestions to Tab Bar
Date: Mon, 15 Mar 2021 19:25:52 +0200	[thread overview]
Message-ID: <87r1kggwi9.fsf@mail.linkov.net> (raw)
In-Reply-To: CH2PR01MB58795709AA9FB1695F618DE88B6D9@CH2PR01MB5879.prod.exchangelabs.com

> 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
>
> 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:
>
> 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

While adding a new face for groups and using it instead of tab-bar-tab-inactive
is easy to do, the real problem is what to do with inactive ungrouped tabs.
To highlight them differently with some dimmed out face, we need first
to detect whether any group is already in use.  Because when groups
are not used, then displaying ungrouped tabs differently makes no sense.
Do you have an idea how to handle such case?

> 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.

This is now pushed as the option 'tab-bar-new-tab-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.

A new let-binding '(tab-bar-new-tab-group t)' was added to 'tab-bar-duplicate-tab'.

> 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,

Currently the user needs to arrange tabs manually to make all group tabs
adjacent.  It's possible to do this automatically.  For example, in
Chromium-based web browsers adding the current tab to the group
changes the position of the tab to be closer to other tabs of the same group.
While it makes some sense, moving the tab without user's consent
is not a good thing to do.  Maybe this behavior of automatically moving
the tab closer to tabs of the same group could be optional?

> but that's something we could clarify in the documentation.

Please suggest where and how this could be explained in the documentation?

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

Thanks, your patches and more ideas are highly appreciated.



  parent reply	other threads:[~2021-03-15 17:25 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 22:51 Some minor suggestions to Tab Bar Gabriel
2021-03-15  9:24 ` Juri Linkov
2021-03-15 17:25 ` Juri Linkov [this message]
2021-03-17 17:46 ` Juri Linkov
2021-03-17 22:31   ` Ergus
2021-03-18  9:20     ` Juri Linkov
2021-03-19  0:28   ` Gabriel
2021-03-22 11:07   ` Zhiwei Chen
2021-03-22 18:47     ` Juri Linkov
2021-03-23 12:17       ` Zhiwei Chen
2021-03-23 18:30         ` Repeat lambda (was: Some minor suggestions to Tab Bar) Juri Linkov
2021-03-26  6:00           ` Zhiwei Chen
2021-03-29 19:28             ` Repeat lambda Juri Linkov
2021-04-05 21:03               ` Juri Linkov
2021-04-11 23:40                 ` Ergus
2021-04-12  2:25                   ` Zhiwei Chen
2021-04-12 16:32                   ` Juri Linkov
2021-04-13 19:35                     ` Juri Linkov
2021-04-13 23:45                       ` T.V Raman
2021-04-14 17:51                         ` Juri Linkov
2021-04-14  5:37                       ` Richard Stallman
2021-04-14  7:18                         ` peat lambda Kévin Le Gouguec
2021-04-14  7:59                           ` Repeat lambda Kévin Le Gouguec
2021-04-16  5:10                           ` peat lambda Richard Stallman
2021-04-14 17:56                         ` Repeat lambda Juri Linkov
2021-04-15  5:24                           ` Richard Stallman
2021-04-05 21:19         ` Some minor suggestions to Tab Bar Juri Linkov
2021-04-06  3:16           ` Zhiwei Chen
2021-03-24 20:19 ` Juri Linkov
2021-03-25  0:47   ` Gabriel
2021-03-25  9:31     ` Juri Linkov
2021-03-26  5:52       ` Gabriel
2021-03-29 19:20         ` 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=87r1kggwi9.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=gabriel376@hotmail.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).