From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Some minor suggestions to Tab Bar Date: Mon, 15 Mar 2021 19:25:52 +0200 Organization: LINKOV.NET Message-ID: <87r1kggwi9.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40375"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Gabriel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 15 18:37:14 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lLr9W-000AKw-4I for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Mar 2021 18:37:14 +0100 Original-Received: from localhost ([::1]:59522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLr9V-0001G8-3y for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Mar 2021 13:37:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLr0A-0002jO-Qj for emacs-devel@gnu.org; Mon, 15 Mar 2021 13:27:34 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:51679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLr08-0002Tn-Fl for emacs-devel@gnu.org; Mon, 15 Mar 2021 13:27:34 -0400 X-Originating-IP: 91.129.108.46 Original-Received: from mail.gandi.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id A28A21BF20D; Mon, 15 Mar 2021 17:27:28 +0000 (UTC) Received-SPF: pass client-ip=217.70.183.201; envelope-from=juri@linkov.net; helo=relay8-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266483 Archived-At: > 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.