From: Heime <heimeborgia@protonmail.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, help-gnu-emacs@gnu.org
Subject: Re: Operation of format-mode-line
Date: Fri, 26 Jul 2024 15:03:12 +0000 [thread overview]
Message-ID: <qBbbOz-aDe_Ahhp4P6x6QRFZzSRryN558YT20U9Tis2LTYv-ulOnpdPmS76qEHhdCoJoA_ozWKzyHaJDGmCdiiHodTvKL8qHwi1oh4E4tu4=@protonmail.com> (raw)
In-Reply-To: <CAP_d_8WtWW1w5qoiZJcc6P2Fd-fj=77HaoWSDMNpXshBEpbAyw@mail.gmail.com>
Sent with Proton Mail secure email.
On Saturday, July 27th, 2024 at 2:40 AM, Yuri Khan <yuri.v.khan@gmail.com> wrote:
> On Fri, 26 Jul 2024 at 21:19, Heime heimeborgia@protonmail.com wrote:
>
>
>
> > > | ‘(WIDTH REST...)’
> > > | 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 −WIDTH columns if its width
> > > | exceeds −WIDTH.
> >
> > For case of (WIDTH REST...), what do I have to do exactly ?
>
>
> Have you read the explanation about positive and negative WIDTHs above?
>
> > Certainly not this way
> >
> > (setq-default mode-line-buffer-identification
> > (list 8
> > (propertized-buffer-identification (format "%%%db" width))))
>
>
> This seems to work for me:
>
> (setq-default mode-line-buffer-identification
> (list -8 (propertized-buffer-identification "%b")))
>
> -8 specifies truncation to 8 characters. And we don’t need to pad if
> we’re going to truncate anyway.
>
> (8 is way too small for a buffer name though.)
Have noticed that doing like this crashes emacs
(setq-default mode-line-buffer-identification
(list wmin (propertized-buffer-identification
(format "%%%db" wmax))))
next prev parent reply other threads:[~2024-07-26 15:03 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 21:58 Operation of format-mode-line Heime
2024-07-22 23:35 ` Heime
2024-07-23 11:11 ` Eli Zaretskii
2024-07-23 11:08 ` Eli Zaretskii
2024-07-23 16:37 ` Heime
2024-07-23 17:48 ` Eli Zaretskii
2024-07-23 18:56 ` Heime
2024-07-23 19:07 ` Eli Zaretskii
2024-07-23 19:13 ` Heime
2024-07-24 2:25 ` Eli Zaretskii
2024-07-24 2:26 ` Eli Zaretskii
2024-07-24 10:18 ` Heime
2024-07-24 11:47 ` Eli Zaretskii
2024-07-24 12:21 ` Heime
2024-07-24 12:33 ` Eli Zaretskii
2024-07-24 12:45 ` Heime
2024-07-24 12:49 ` Eli Zaretskii
2024-07-24 13:08 ` Heime
2024-07-24 13:23 ` Eli Zaretskii
2024-07-24 14:01 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 15:40 ` Heime
2024-07-24 16:07 ` Yuri Khan
2024-07-24 16:30 ` Heime
2024-07-25 7:18 ` Eli Zaretskii
[not found] ` <xcc1gVM6XKE-ico4XNriwG861wQPgutbXkfzbmOm-zJodpgHcHGR1huyU9K6BxLKj74YmoIgW1gJ=5FKLijHm5xBpeE8=5FZOS0Gt004N88wyoI=3D@protonmail.com>
[not found] ` <CAP=5Fd=5F8W6kgSQeeG2j2M3=5Fb1tt+x1wFWRvbYGhhO+SiUKy8DBoQ@mail.gmail.com>
[not found] ` <ct3r-DS=5FknVmOlOCFGzqE7-EZyNzHpRPYvr7TTkpm83DWs6ggCvRkenWdLCAxZTlCmyBFFYmMGRtA mHeL1VWRtrVZQH17UOLirJbvYF7zAk=3D@protonmail.com>
[not found] ` <CAP=5Fd=5F8XV3qskKJogzZY4X=5F+h1wzfR5Q9KYnJKdA504CcG0TvmA@mail.gmail.com>
2024-07-25 12:39 ` Heime
2024-07-25 12:50 ` Yuri Khan
2024-07-25 13:20 ` Heime
2024-07-25 15:26 ` Yuri Khan
2024-07-25 16:01 ` Heime
2024-07-25 17:27 ` Heime
2024-07-25 18:18 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-25 19:23 ` Heime
2024-07-26 11:38 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-26 12:47 ` Heime
2024-07-26 13:26 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-26 14:18 ` Heime
2024-07-26 14:40 ` Yuri Khan
2024-07-26 15:03 ` Heime [this message]
2024-07-26 17:32 ` Heime
2024-07-26 20:30 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-27 6:01 ` Eli Zaretskii
2024-07-27 11:08 ` Heime
2024-07-27 12:06 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-28 11:00 ` Heime
2024-07-28 15:30 ` Manuel Giraud via Users list for the GNU Emacs text editor
2024-07-28 16:14 ` Heime
2024-07-28 16:53 ` Heime
2024-07-28 17:29 ` Heime
2024-07-28 17:46 ` Christopher Dimech
2024-07-28 17:59 ` Manuel Giraud via Users list for the GNU Emacs text editor
2024-07-28 18:39 ` Heime
2024-07-28 20:48 ` [External] : " Drew Adams
2024-07-29 10:26 ` Michael Heerdegen
2024-07-24 16:35 ` Eli Zaretskii
2024-07-24 16:45 ` Heime
[not found] <RHkfCJX8r5At5BX=5Ff30hL2EoYH6qQXzEbjBXr0Lw1DL94KYNXjJsdaLrB-r8fd6-DTqkNbsw1fFi-QzBBtR-lcJGJ5cz22QjLYYhCqqgfvg=3D@protonmail.com>
[not found] ` <f-AU6lFTwKIVxp95wzU6pdhSaxX45u25TLr7ozfvGH=5FDr7B2IhDHVhKR92YDxgzwiaR99n6190RVjtknhebwf8vMT60so-OqhThZdeIzLhs=3D@protonmail.com>
[not found] ` <CAP=5Fd=5F8V7KJr3kji6rhVAA-+6cYjxeQBkYJkSjz4cPt-QDwWWig@mail.gmail.com>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='qBbbOz-aDe_Ahhp4P6x6QRFZzSRryN558YT20U9Tis2LTYv-ulOnpdPmS76qEHhdCoJoA_ozWKzyHaJDGmCdiiHodTvKL8qHwi1oh4E4tu4=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=yuri.v.khan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).