From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72309: propertized-buffer-identification with maximum width Date: Sat, 27 Jul 2024 13:08:31 +0000 Message-ID: <4NGOfJklhGgHco35Z3hgQLAbDA27v3FQW-VrjVbIMZ19Giduj_FYccq70KrUy7HlB2FgttLYBhiUJHL32RFS73-Ex6XnFwoaQqpdfQcn7_8=@protonmail.com> References: <8eYtcka1bg4aOfbQVrzRShsG1EtNIu1JLO9XlRoQXZ4Q7yqojew5kxXcml4s-JdvwA7hgEdo_0-YEQf0zknb2wq9aS_-rgwEZB0ZT9y6QWM=@protonmail.com> <86jzh72xml.fsf@gnu.org> <86v80r11mk.fsf@gnu.org> <86plqz0z2g.fsf@gnu.org> Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72309@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 27 15:09:26 2024 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 1sXhAr-0008Un-Ms for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jul 2024 15:09:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXhAR-00088b-7x; Sat, 27 Jul 2024 09:08:59 -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 1sXhAN-00084x-3D for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 09:08:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXhAM-0001Y6-Re for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 09:08:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=+zgv322GkkQBbiDL82zl49VwKArWvOMmUpzMP88mDl0=; b=FgPgm9hcypeVK1JkSD4Z9NGgzM7rEYdE3wKeWhH8ltJaKdEyXBHHuwlkldMHnh2jqals70biKfczUV/TrPNi2JjszSH6/j6GHeZF6yFTBSeRXEURCDrNHvX7VHxFcpP5qgtzbbVLXHrQvEO2FKJY1M/yElgTyNth80REeZnGk6za0v7MBSkru+pyNt4yI55fDI5qcPmYCwrx7ndgbzRSVyg2GjtJt83IfFlw9T/KVheBU5xeuCLu7raslpYpdLtglE7PuMtuVXdaF1e0C/NUv6AbWFWP+zjLZDvZYeuhdYcs4Z5etuV+rtt145UqrtrkQkVBoa2iEhwYoTrccCkxRA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sXhAW-0003Vk-Oc for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 09:09:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Heime Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2024 13:09:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72309 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 72309-submit@debbugs.gnu.org id=B72309.172208573413252 (code B ref 72309); Sat, 27 Jul 2024 13:09:04 +0000 Original-Received: (at 72309) by debbugs.gnu.org; 27 Jul 2024 13:08:54 +0000 Original-Received: from localhost ([127.0.0.1]:40999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXhAM-0003RS-96 for submit@debbugs.gnu.org; Sat, 27 Jul 2024 09:08:54 -0400 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]:20441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXhAK-0003Qf-CD for 72309@debbugs.gnu.org; Sat, 27 Jul 2024 09:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722085716; x=1722344916; bh=d+gBAu/oYAGgObfVUwMO++dG8IeEJV4FkeQ//I6+L2Q=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=tIx01cNFdBwU/TUY/tXP4gGh3/dZCKwynUGS1tpffvMxtquOjKuwlU8wslQ9/OD4B EfPY06Vppfm5yiPlUDEonzzntZpVavnYH+/ajn+pE/w1cQo8t5+xf/WJAPb4uvs1I3 CM7dnwEzbe8zwKPxxWrnCTsDlOAoARmI4wLSXFypp6GEp3Vi0BzLbyYHfmD+BQpa6X H+/0caJ/nywpGxdYZqGVhhmkyxmBFzR7ymr4trHkpeGuxw3qONRVwhMOQnDyCyvtkS szdE289RnveM65Kmv6Bombvety2rlzac7gxpDCA8qF0zkzFC33Zj6UT5F6mKRYM+u4 kMGJMm0p7ffyg== In-Reply-To: <86plqz0z2g.fsf@gnu.org> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: bdce168daa0ae53c41944d115573a08f63e89a50 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289429 Archived-At: On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii wrote: > > Date: Sat, 27 Jul 2024 12:23:20 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: 72309@debbugs.gnu.org > >=20 > > Sent with Proton Mail secure email. > >=20 > > On Sunday, July 28th, 2024 at 12:05 AM, Eli Zaretskii eliz@gnu.org wrot= e: > >=20 > > > > Date: Sat, 27 Jul 2024 09:22:21 +0000 > > > > From: Heime heimeborgia@protonmail.com > > > > Cc: 72309@debbugs.gnu.org > > > >=20 > > > > On Saturday, July 27th, 2024 at 5:48 PM, Eli Zaretskii eliz@gnu.org= wrote: > > > >=20 > > > > > tags 72309 notabug > > > > > thanks > > > > >=20 > > > > > > Date: Fri, 26 Jul 2024 19:04:14 +0000 > > > > > > From: Heime via "Bug reports for GNU Emacs, > > > > > > the Swiss army knife of text editors" bug-gnu-emacs@gnu.org > > > > > >=20 > > > > > > propertized-buffer-identification could be improved so that whe= n using a > > > > > > maximum width there are three dots and a space at the end to in= dicate > > > > > > that the buffer name has been truncated. > > > > >=20 > > > > > Emacs doesn't truncate the buffer name shown on the mode line, so= no > > > > > ellipsis should be needed, ever. IOW, the maximum width is basica= lly > > > > > infinity. > > > > >=20 > > > > > Where did you see the buffer name truncated on the mode line? > > > >=20 > > > > There is this construct > > > >=20 > > > > (width rest=E2=80=A6) > > > >=20 > > > > which specifies truncation or padding of the results of rest. > > > >=20 > > > > If used on the buffer name it just truncates without specification > > > > that truncation occurred. > > >=20 > > > Where in the Emacs code did you see that? I cannot find anything like > > > that in bindings.el, which is where we have the code used for > > > displaying the buffer name on the mode line. > >=20 > > The last entry in "24.4.2 The Data Structure of the Mode Line". > >=20 > > I have tried it and setting a maximum width does work and the abrupt > > truncation in the buffer name does occur. >=20 >=20 > Yes, but the (WIDTH something) construct is not for truncating long > names, it's for ensuring the string produced by "something" doesn't > take too many columns. So you are using this for a wrong purpose. If > you want to truncate a buffer's name, use truncate-string-to-width > instead, which is also capable of showing the ellipsis at the end. I do not know how to access the buffer name and apply truncate-string-to-wi= dth when setting mode-line-buffer-identification on propertized-buffer-identifi= cation. It is a very difficult thing.