From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#38693: 27.0.50; tab-bar: automatic tab names should be shortened Date: Mon, 20 Jan 2020 02:36:51 +0200 Organization: LINKOV.NET Message-ID: <87blqzklp8.fsf@mail.linkov.net> References: <87r20yriqx.fsf@len.workgroup> <878sn5b6af.fsf@mail.linkov.net> <87sglalrwm.fsf@len.workgroup> <87a77ghyf0.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56522"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu) Cc: 38693@debbugs.gnu.org To: Gregor Zattler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 20 01:43:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1itLA0-000Efi-5M for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Jan 2020 01:43:20 +0100 Original-Received: from localhost ([::1]:55794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itL9y-0005xI-2I for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Jan 2020 19:43:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36826) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itL9j-0005vi-Rb for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2020 19:43:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itL9i-0007t1-MT for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2020 19:43:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itL9i-0007sl-JJ for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2020 19:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1itL9i-00012E-HO for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2020 19:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jan 2020 00:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38693 X-GNU-PR-Package: emacs Original-Received: via spool by 38693-submit@debbugs.gnu.org id=B38693.15794809743950 (code B ref 38693); Mon, 20 Jan 2020 00:43:02 +0000 Original-Received: (at 38693) by debbugs.gnu.org; 20 Jan 2020 00:42:54 +0000 Original-Received: from localhost ([127.0.0.1]:44189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itL9a-00011d-HB for submit@debbugs.gnu.org; Sun, 19 Jan 2020 19:42:54 -0500 Original-Received: from caracal.birch.relay.mailchannels.net ([23.83.209.30]:33653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itL9X-00011S-0b for 38693@debbugs.gnu.org; Sun, 19 Jan 2020 19:42:52 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id F40C02C0F0F; Mon, 20 Jan 2020 00:42:47 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a96.g.dreamhost.com (100-96-87-46.trex.outbound.svc.cluster.local [100.96.87.46]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 756F22C14EA; Mon, 20 Jan 2020 00:42:47 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a96.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Mon, 20 Jan 2020 00:42:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Keen-Decisive: 00da4ae30e99cb2d_1579480967709_1404614740 X-MC-Loop-Signature: 1579480967708:1023252034 X-MC-Ingress-Time: 1579480967708 Original-Received: from pdx1-sub0-mail-a96.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a96.g.dreamhost.com (Postfix) with ESMTP id 2C9617F074; Sun, 19 Jan 2020 16:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=hqHSDtWN4GqD9Y+i6vAe6O+KuJU=; b= HFpU8cnMtStk8zK5800SWJLT+8cedY6PsYcs7lDqeezErJ3nrLwzRtTdJdlaZkIr MJZN6Uw8VX7LkI201ECgbmnfE/xNC5b82hApdsYlhzK8CtnT29Rmup/PncsPLBfb b2s5H3UlsCWw1CvOaaSXPgji3YKqACfh4dHNlu5UU+s= Original-Received: from mail.jurta.org (m91-129-103-201.cust.tele2.ee [91.129.103.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a96.g.dreamhost.com (Postfix) with ESMTPSA id 457077F075; Sun, 19 Jan 2020 16:42:39 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a96 In-Reply-To: <87a77ghyf0.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 25 Dec 2019 23:45:39 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudeggddvgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvtddunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtfedrvddtuddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehgrhhfiiesghhmgidruggvnecuvehluhhsthgvrhfuihiivgepvd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:174893 Archived-At: >>>> Please provide an option to dynamically shorten at least >>>> automatic tab labels in order not to overflow the tab bar into >>>> another line OR provide an option with sensible default for the >>>> max length of automatic tab labels (e.g. 23 characters per tab >>>> label would allow for at least 3 tabs on a 80 char terminal) OR >>>> something to such effect. >>> >>> Maybe such a new option: >>> >>> (defcustom tab-bar-tab-name-max 23 >>> >>> and using it on the default values of tab-bar-tab-name-current, >>> tab-bar-tab-name-current-with-count, tab-bar-tab-name-all? >> >> yes, this would be helpful for me. > > I'm still not sure whether to use the new option in all functions above, > or add a new function that truncates the name. It seems the latter is > better: > > +(defcustom tab-bar-tab-name-truncated-max 20 > + "Maximum length of the tab name from the current buffer. > +Effective when `tab-bar-tab-name-function' is customized > +to `tab-bar-tab-name-truncated'." > + :type 'integer > + :group 'tab-bar > + :version "27.1") The same option should be added also to tab-line to truncate tab-line tab names. Currently I fixed a bug that occurred when a tab name was longer than window width. With such an option set to some reasonable default value this situation won't happen.