From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Fix width tabs Date: Fri, 04 Nov 2022 10:07:53 +0200 Message-ID: <83r0yj5ehy.fsf@gnu.org> References: <87wnhtfad7.fsf@gmail.com> <865ypcmx6s.fsf@mail.linkov.net> <87sfsgfd2b.fsf@gmail.com> <86mtimzt13.fsf@mail.linkov.net> <86fsock4f1.fsf@mail.linkov.net> <867d0lww7o.fsf@mail.linkov.net> <87k04h850x.fsf@gmail.com> <86tu3hxmkz.fsf@mail.linkov.net> <86tu3fnor9.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3151"; mail-complaints-to="usenet@ciao.gmane.io" Cc: orontee@gmail.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 04 09:08:53 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 1oqrkz-0000e9-Ar for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Nov 2022 09:08:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqrkC-0005JQ-Gd; Fri, 04 Nov 2022 04:08:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqrkA-0005Gj-Oh for emacs-devel@gnu.org; Fri, 04 Nov 2022 04:08:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqrkA-0008Dg-C0; Fri, 04 Nov 2022 04:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4yg/pGO8jbDD5D6yBr8YUhsZXXscn+gPlFT8iMKjyw0=; b=X7D1obxADjuy lWvwLDg0Ap0C/7b7CsdGbzcE2Gpae80Mb5DppB38V9xy5laYFJq02FSJWvoop/4MqKZQM9rE1mWVN DvXBnZYbuZLn23nVJ3gUE8g3uy29NGrKCbS/upK4CkV3v+Hu9Ur9V9iaN+eaPvCAUbaDiHXNnBznT balZH/HbnknRoe7s2UFgd9g/lo+URaeUhE9zFmj2/yABGPiO0Z8ULv9x33J7mVbk8WVRQZP1d1SM6 1sPVknW4SkuyaJyNgtTy27u5xBUZLGAkLnizYm2PVB9a4O5pWfKAkh5VIYepOUFdGS1OTpdIHrZ1P RWMGQYqn1noVSxzDcpsFZA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqrk7-0003yF-RR; Fri, 04 Nov 2022 04:08:02 -0400 In-Reply-To: <86tu3fnor9.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 04 Nov 2022 09:48:58 +0200) 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: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299115 Archived-At: > From: Juri Linkov > Cc: emacs-devel@gnu.org > Date: Fri, 04 Nov 2022 09:48:58 +0200 > > >> Firefox choose to change the foreground color on tabs end to make names > >> easier to read. I guess it isn't supported by Emacs. So I use to set > >> tab-bar-tab-name-function to tab-bar-tab-name-truncated and > >> tab-bar-tab-name-ellipsis to t. It helps distinguish the separation > >> between tab names. Is it expected for the truncation to not applying > >> anymore with the code you sent? > > > > But using a faded foreground color like in Firefox is > > the right thing to do. After adding this to the end > > produces such nice look where tab names are fading to the right: > > This feature is pushed now enabled by default. Thanks. However, I have problems with the documentation of this feature: (defcustom tab-bar-fixed-width t "Automatically resize tabs on the tab bar to the fixed width. This variable is intended to solve two problems. When switching buffers on the current tab, the tab changes its name to buffer names of various lengths, thus resizing the tab and shifting the tab positions on the tab bar. But with the fixed width, the size of the tab name doesn't change when the tab name changes, thus keeping the fixed tab bar layout. The second problem solved by this variable is to prevent wrapping the long tab bar to the second line, thus keeping the height of the tab bar always fixed to one line. The maximum tab width is defined by the variable `tab-bar-fixed-width-max'." This begs the question: what is the fixed width to which the tabs are resized? if it's "fixed", then the value is known in advance, right? Moreover, if the tab sizes are fixed, why does the doc string say "automatically resize"? "resizing" is the antithesis of "fixed width". Can you explain in plain words what this option does, when it is non-nil? (There's a hint to that in the doc string of tab-bar-fixed-width-max, but that's not the right place for this information.) Also, what does it do when it's nil? The style of the doc string is also problematic: we shouldn't describe in a doc string of user option what problems it solves. Instead, we should tell what is the behavior for each valid value of the option; the judgment of what is a "problem" and what isn't is left to the user, because the needs of users may differ, and what is a "problem" for some is a "solution" to others. That's why we have user options to begin with. The NEWS entry is also problematic, basically for the same reason. We should fix this.