From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Operation of format-mode-line Date: Fri, 26 Jul 2024 14:18:01 +0000 Message-ID: References: <87frrxjpx8.fsf@web.de> <87ttgco01g.fsf@web.de> <875xss2siz.fsf@web.de> 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="37646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 26 16:19:15 2024 Return-path: Envelope-to: geh-help-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 1sXLmt-0009as-Mm for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 26 Jul 2024 16:19:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXLm8-0006Ss-I9; Fri, 26 Jul 2024 10:18:28 -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 1sXLm6-0006Kl-FY for help-gnu-emacs@gnu.org; Fri, 26 Jul 2024 10:18:26 -0400 Original-Received: from mail-40137.protonmail.ch ([185.70.40.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXLly-0006ts-Ps for help-gnu-emacs@gnu.org; Fri, 26 Jul 2024 10:18:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722003495; x=1722262695; bh=h5XuJdhdK+6Gg+lrYxsxY3D+D3PcRlW1ZRz5T4Yepxc=; 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=s2RmhreQJuZpdnB1yGVLoUacUi9UP6F1HF41I0btAQso5iqzWi89KIVrKGwBBqScL 6r9m/YVFPJvR/XoEVLu0Ve1SROrCTvR9x8nMapo7Tj2s5Gm5q7Rwjbt0VRDv83AIZh y4H1DOl8nAQ85/jvXkNOSKAxBAHBxDul+IOty2bv4z2NVmSNBmJP/LJk/GPiqWuq+s yJmC1afo+yUW9E/FJ1KON2KE7jpaAby69+iY1D4rBFNlbp/fz/M7v+pnJbpCY49vlO myT7UjcaorvrnUVAziq6uipTI4OyWV3yAIOjnTGNezkxXF29IkOmXMuLjCVwPeb+9v FZAq7d+hw9mTg== In-Reply-To: <875xss2siz.fsf@web.de> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 91dd9e1e8365d1a672ef0cad96efb72fac29340f Received-SPF: pass client-ip=185.70.40.137; envelope-from=heimeborgia@protonmail.com; helo=mail-40137.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147383 Archived-At: On Saturday, July 27th, 2024 at 1:26 AM, Michael Heerdegen via Users list f= or the GNU Emacs text editor wrote: > Heime heimeborgia@protonmail.com writes: >=20 > > Meaning that if a buffer name length exceeds the width, the full > > buffer name is still printed. Something must be wrong because it > > should not be this hard to change this minor buffer name appearance. >=20 >=20 > I think I see now one reason of your confusion: >=20 > | In any construct except =E2=80=98%%=E2=80=99, you can add a decimal int= eger after the > | =E2=80=98%=E2=80=99 to specify a minimum field width. >=20 > See (info "(elisp) %-Constructs"). Not the maximum width. Ok? >=20 > To truncate a string, use `truncate-string-to-width'. Or, if you want > to rely on mode-line special constructs, >=20 > | =E2=80=98(WIDTH REST...)=E2=80=99 > | A list whose first element is an integer specifies truncation or > | padding of the results of REST. The remaining elements REST are > | processed recursively as mode line constructs and concatenated > | together. When WIDTH is positive, the result is space filled on > | the right if its width is less than WIDTH. When WIDTH is negative, > | the result is truncated on the right to =E2=88=92WIDTH columns if its w= idth > | exceeds =E2=88=92WIDTH. >=20 > See (info "(elisp) Mode Line Data"). >=20 > I guess it could be less confusing and annoying for you to have a look > at those parts of the manual. - Michael. For case of (WIDTH REST...), what do I have to do exactly ? Certainly not this way (setq-default mode-line-buffer-identification (list 8 (propertized-buffer-identification (format "%%%db" width))))