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: Fix width tabs Date: Fri, 18 Feb 2022 09:49:15 +0200 Organization: LINKOV.NET Message-ID: <865ypcmx6s.fsf@mail.linkov.net> References: <87wnhtfad7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30903"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Matthias Meulien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 18 08:54:32 2022 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 1nKy64-0007uY-2X for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Feb 2022 08:54:32 +0100 Original-Received: from localhost ([::1]:55234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKy61-000822-1M for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Feb 2022 02:54:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKy4m-0007KP-I9 for emacs-devel@gnu.org; Fri, 18 Feb 2022 02:53:12 -0500 Original-Received: from [2001:4b98:dc4:8::224] (port=49607 helo=relay4-d.mail.gandi.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKy4k-0005DI-HY for emacs-devel@gnu.org; Fri, 18 Feb 2022 02:53:12 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 8A91FE0007; Fri, 18 Feb 2022 07:53:05 +0000 (UTC) In-Reply-To: <87wnhtfad7.fsf@gmail.com> (Matthias Meulien's message of "Thu, 17 Feb 2022 22:31:48 +0100") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4b98:dc4:8::224 (failed) Received-SPF: pass client-ip=2001:4b98:dc4:8::224; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:286437 Archived-At: > When a tab has multiple windows, its name is updated depending on > current buffer name. Switching window (C-x o) results in the tab being > renamed. This problem doesn't exist when tab-bar-tab-name-function shows all window buffers with tab-bar-tab-name-all. So a possible solution is to enable this by default. > But buffer names of a given tab have heterogeneous lengths (*Help*, > *Summary Listes/emacs-devel*, etc.). Thus the tab bar layout may change > a lot while switching window, which is annoying: Visually, the tab bar > can occupy two lines then one, etc. > > I'd like to configure all tabs to have the same width, whatever the > length of the name of the current buffer of a particular tab is. That > width could be the frame width divided by the number of tabs. > > But I've not found a way to do that with current options. Is it already > possible? Yes, it's possible to do by writing a new function for tab-bar-tab-name-function. There was a similar function for fixed tab widths in tab-line.el, but after discussions it was removed because it wasted too much screen space with empty spaces used to adjust for fixed widths. > My understanding is that it's the default behavior in other applications > like Firefox. Is there good reason to have different default? The good reason is to have the more compact tab bar. If you want, you could try experimenting by writing a function for tab-bar-tab-name-function with padding every tab name by proportional amount of space.