GNU bug report logs -
#72309
propertized-buffer-identification with maximum width
Previous Next
Reported by: Heime <heimeborgia <at> protonmail.com>
Date: Fri, 26 Jul 2024 19:05:01 UTC
Severity: normal
Tags: notabug
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Sent with Proton Mail secure email.
On Monday, July 29th, 2024 at 12:29 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sun, 28 Jul 2024 12:18:32 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: Eli Zaretskii eliz <at> gnu.org, 72309 <at> debbugs.gnu.org
> >
> > > > > What is the big problem of showing how to implement this, buffer name
> > > > > with truncation ellipses using mode-line-buffer-identification ?
> > > >
> > > > We don't have people here whose job is to write code for others. This
> > > > is a volunteer-based project, where people help you with ideas, but
> > > > the actual job of writing and debugging the code is yours.
> > > >
> > > > So please take the ideas, read the documentation, and work on the
> > > > implementation you want. If you have questions about the
> > > > implementation, please ask them on help-gnu-emacs, which is where
> > > > user-level help should be sought.
> >
> > The implementations do not work.
> >
> > For instance, using
> >
> > (name (buffer-name))
> >
> > or with
> >
> > (buffer-name (window-buffer))
> >
> > See
> >
> > (setq-default mode-line-buffer-identification
> > (propertized-buffer-identification
> > (format " %s "
> > (let ( (name (buffer-name)) )
> > (if (> (length name) wmax)
> > (concat (substring name 0 (- wmax 3)) "...")
> > name))))) )
> >
> > And neither does this
> >
> > (let* ( (bfname (buffer-name (window-buffer)))
> > (tkname (if (> (length bfname) wmax)
> > (truncate-string-to-width bfname wmax nil nil "...")
> > bfname)))
> > (propertized-buffer-identification (format " %s " tkname))))
> >
> > So there is no option other than using %b, where one has no control about
> > how it gets displayed.
>
>
> Your conclusions are wrong.
If I put a question on emacs help, would you answer it in
a way that gets things to work ?
This bug report was last modified 141 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.