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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72309 in the body.
You can then email your comments to 72309 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Fri, 26 Jul 2024 19:05:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Heime <heimeborgia <at> protonmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 26 Jul 2024 19:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
propertized-buffer-identification could be improved so that when using a
maximum width there are three dots and a space at the end to indicate
that the buffer name has been truncated.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 05:52:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 72309 <at> debbugs.gnu.org (full text, mbox):
tags 72309 notabug
thanks
> 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 <at> gnu.org>
>
>
> propertized-buffer-identification could be improved so that when using a
> maximum width there are three dots and a space at the end to indicate
> that the buffer name has been truncated.
Emacs doesn't truncate the buffer name shown on the mode line, so no
ellipsis should be needed, ever. IOW, the maximum width is basically
infinity.
Where did you see the buffer name truncated on the mode line?
Added tag(s) notabug.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 27 Jul 2024 05:52:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 09:23:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 72309 <at> debbugs.gnu.org (full text, mbox):
On Saturday, July 27th, 2024 at 5:48 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> tags 72309 notabug
> thanks
>
> > 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 <at> gnu.org
> >
> > propertized-buffer-identification could be improved so that when using a
> > maximum width there are three dots and a space at the end to indicate
> > that the buffer name has been truncated.
>
>
> Emacs doesn't truncate the buffer name shown on the mode line, so no
> ellipsis should be needed, ever. IOW, the maximum width is basically
> infinity.
>
> Where did you see the buffer name truncated on the mode line?
There is this construct
(width rest…)
which specifies truncation or padding of the results of rest.
If used on the buffer name it just truncates without specification
that truncation occurred.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 12:08:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 27 Jul 2024 09:22:21 +0000
> From: Heime <heimeborgia <at> protonmail.com>
> Cc: 72309 <at> debbugs.gnu.org
>
> On Saturday, July 27th, 2024 at 5:48 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > tags 72309 notabug
> > thanks
> >
> > > 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 <at> gnu.org
> > >
> > > propertized-buffer-identification could be improved so that when using a
> > > maximum width there are three dots and a space at the end to indicate
> > > that the buffer name has been truncated.
> >
> >
> > Emacs doesn't truncate the buffer name shown on the mode line, so no
> > ellipsis should be needed, ever. IOW, the maximum width is basically
> > infinity.
> >
> > Where did you see the buffer name truncated on the mode line?
>
>
> There is this construct
>
> (width rest…)
>
> which specifies truncation or padding of the results of rest.
>
> If used on the buffer name it just truncates without specification
> that truncation occurred.
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 12:24:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 72309 <at> debbugs.gnu.org (full text, mbox):
Sent with Proton Mail secure email.
On Sunday, July 28th, 2024 at 12:05 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sat, 27 Jul 2024 09:22:21 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: 72309 <at> debbugs.gnu.org
> >
> > On Saturday, July 27th, 2024 at 5:48 PM, Eli Zaretskii eliz <at> gnu.org wrote:
> >
> > > tags 72309 notabug
> > > thanks
> > >
> > > > 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 <at> gnu.org
> > > >
> > > > propertized-buffer-identification could be improved so that when using a
> > > > maximum width there are three dots and a space at the end to indicate
> > > > that the buffer name has been truncated.
> > >
> > > Emacs doesn't truncate the buffer name shown on the mode line, so no
> > > ellipsis should be needed, ever. IOW, the maximum width is basically
> > > infinity.
> > >
> > > Where did you see the buffer name truncated on the mode line?
> >
> > There is this construct
> >
> > (width rest…)
> >
> > which specifies truncation or padding of the results of rest.
> >
> > If used on the buffer name it just truncates without specification
> > that truncation occurred.
>
>
> 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.
The last entry in "24.4.2 The Data Structure of the Mode Line".
I have tried it and setting a maximum width does work and the abrupt
truncation in the buffer name does occur.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 13:02:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 27 Jul 2024 12:23:20 +0000
> From: Heime <heimeborgia <at> protonmail.com>
> Cc: 72309 <at> debbugs.gnu.org
>
>
>
>
>
>
> Sent with Proton Mail secure email.
>
> On Sunday, July 28th, 2024 at 12:05 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > > Date: Sat, 27 Jul 2024 09:22:21 +0000
> > > From: Heime heimeborgia <at> protonmail.com
> > > Cc: 72309 <at> debbugs.gnu.org
> > >
> > > On Saturday, July 27th, 2024 at 5:48 PM, Eli Zaretskii eliz <at> gnu.org wrote:
> > >
> > > > tags 72309 notabug
> > > > thanks
> > > >
> > > > > 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 <at> gnu.org
> > > > >
> > > > > propertized-buffer-identification could be improved so that when using a
> > > > > maximum width there are three dots and a space at the end to indicate
> > > > > that the buffer name has been truncated.
> > > >
> > > > Emacs doesn't truncate the buffer name shown on the mode line, so no
> > > > ellipsis should be needed, ever. IOW, the maximum width is basically
> > > > infinity.
> > > >
> > > > Where did you see the buffer name truncated on the mode line?
> > >
> > > There is this construct
> > >
> > > (width rest…)
> > >
> > > which specifies truncation or padding of the results of rest.
> > >
> > > If used on the buffer name it just truncates without specification
> > > that truncation occurred.
> >
> >
> > 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.
>
> The last entry in "24.4.2 The Data Structure of the Mode Line".
>
> I have tried it and setting a maximum width does work and the abrupt
> truncation in the buffer name does occur.
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 13:09:04 GMT)
Full text and
rfc822 format available.
Message #25 received at 72309 <at> debbugs.gnu.org (full text, mbox):
On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sat, 27 Jul 2024 12:23:20 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: 72309 <at> debbugs.gnu.org
> >
> > Sent with Proton Mail secure email.
> >
> > On Sunday, July 28th, 2024 at 12:05 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> >
> > > > Date: Sat, 27 Jul 2024 09:22:21 +0000
> > > > From: Heime heimeborgia <at> protonmail.com
> > > > Cc: 72309 <at> debbugs.gnu.org
> > > >
> > > > On Saturday, July 27th, 2024 at 5:48 PM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > >
> > > > > tags 72309 notabug
> > > > > thanks
> > > > >
> > > > > > 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 <at> gnu.org
> > > > > >
> > > > > > propertized-buffer-identification could be improved so that when using a
> > > > > > maximum width there are three dots and a space at the end to indicate
> > > > > > that the buffer name has been truncated.
> > > > >
> > > > > Emacs doesn't truncate the buffer name shown on the mode line, so no
> > > > > ellipsis should be needed, ever. IOW, the maximum width is basically
> > > > > infinity.
> > > > >
> > > > > Where did you see the buffer name truncated on the mode line?
> > > >
> > > > There is this construct
> > > >
> > > > (width rest…)
> > > >
> > > > which specifies truncation or padding of the results of rest.
> > > >
> > > > If used on the buffer name it just truncates without specification
> > > > that truncation occurred.
> > >
> > > 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.
> >
> > The last entry in "24.4.2 The Data Structure of the Mode Line".
> >
> > I have tried it and setting a maximum width does work and the abrupt
> > truncation in the buffer name does occur.
>
>
> 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-width
when setting mode-line-buffer-identification on propertized-buffer-identification.
It is a very difficult thing.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 13:31:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 27 Jul 2024 13:08:31 +0000
> From: Heime <heimeborgia <at> protonmail.com>
> Cc: 72309 <at> debbugs.gnu.org
>
> On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > 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-width
> when setting mode-line-buffer-identification on propertized-buffer-identification.
Use :eval.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 14:57:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 72309 <at> debbugs.gnu.org (full text, mbox):
Sent with Proton Mail secure email.
On Sunday, July 28th, 2024 at 1:29 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sat, 27 Jul 2024 13:08:31 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: 72309 <at> debbugs.gnu.org
> >
> > On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> >
> > > 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-width
> > when setting mode-line-buffer-identification on propertized-buffer-identification.
>
>
> Use :eval.
I have done it without success
(defun vodil-rtgbfn (wmin)
(setq-default mode-line-buffer-identification
(propertized-buffer-identification (format " %%%db " wmin))))
(vodil-rtgbfn 8)
(setq-default mode-line-format
'( "%e" (:eval (truncate-string-to-width mode-line-buffer-identification 13))
vodil-panelit-bfselec))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 15:28:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 72309 <at> debbugs.gnu.org (full text, mbox):
Sent with Proton Mail secure email.
On Sunday, July 28th, 2024 at 2:56 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
>
>
>
>
>
> Sent with Proton Mail secure email.
>
>
> On Sunday, July 28th, 2024 at 1:29 AM, Eli Zaretskii eliz <at> gnu.org wrote:
>
> > > Date: Sat, 27 Jul 2024 13:08:31 +0000
> > > From: Heime heimeborgia <at> protonmail.com
> > > Cc: 72309 <at> debbugs.gnu.org
> > >
> > > On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > >
> > > > 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-width
> > > when setting mode-line-buffer-identification on propertized-buffer-identification.
> >
> > Use :eval.
>
>
> I have done it without success
>
> (defun vodil-rtgbfn (wmin)
> (setq-default mode-line-buffer-identification
> (propertized-buffer-identification (format " %%%db " wmin))))
>
> (vodil-rtgbfn 8)
>
> (setq-default mode-line-format
> '( "%e" (:eval (truncate-string-to-width mode-line-buffer-identification 13))
> vodil-panelit-bfselec))
Have now done, but now the buffer name is not displayed. Why has there
to be so much torture to change the defaults !
(defun vodil-tkbfn-ellipses (wmax)
"Get the buffer name truncated to WMAX width with ellipsis."
(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))))
(defun vodil-tkbfn (wmax)
"Set mode-line-buffer-identification with WMAX maximum width."
(setq-default mode-line-buffer-identification
'(:eval (vodil-tkbfn-ellipses wmax))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sat, 27 Jul 2024 20:50:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 72309 <at> debbugs.gnu.org (full text, mbox):
On Sunday, July 28th, 2024 at 3:27 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
> Sent with Proton Mail secure email.
>
> On Sunday, July 28th, 2024 at 2:56 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
>
> > Sent with Proton Mail secure email.
> >
> > On Sunday, July 28th, 2024 at 1:29 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> >
> > > > Date: Sat, 27 Jul 2024 13:08:31 +0000
> > > > From: Heime heimeborgia <at> protonmail.com
> > > > Cc: 72309 <at> debbugs.gnu.org
> > > >
> > > > On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > >
> > > > > 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-width
> > > > when setting mode-line-buffer-identification on propertized-buffer-identification.
> > >
> > > Use :eval.
> >
> > I have done it without success
> >
> > (defun vodil-rtgbfn (wmin)
> > (setq-default mode-line-buffer-identification
> > (propertized-buffer-identification (format " %%%db " wmin))))
> >
> > (vodil-rtgbfn 8)
> >
> > (setq-default mode-line-format
> > '( "%e" (:eval (truncate-string-to-width mode-line-buffer-identification 13))
> > vodil-panelit-bfselec))
>
>
>
> Have now done, but now the buffer name is not displayed. Why has there
> to be so much torture to change the defaults !
>
> (defun vodil-tkbfn-ellipses (wmax)
> "Get the buffer name truncated to WMAX width with ellipsis."
>
> (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))))
>
>
> (defun vodil-tkbfn (wmax)
> "Set mode-line-buffer-identification with WMAX maximum width."
>
> (setq-default mode-line-buffer-identification
> '(:eval (vodil-tkbfn-ellipses wmax))))
>
What is the big problem of showing how to implement this, buffer name
with truncation ellipses using mode-line-buffer-identification ?
Can there be some additional commands to make this possibility less
cumbersome. For instance, an option that gives mode-line-buffer-identification
with truncation ellipses.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 04:57:01 GMT)
Full text and
rfc822 format available.
Message #40 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 27 Jul 2024 20:49:05 +0000
> From: Heime <heimeborgia <at> protonmail.com>
> Cc: 72309 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>
> On Sunday, July 28th, 2024 at 3:27 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
>
> > Sent with Proton Mail secure email.
> >
> > On Sunday, July 28th, 2024 at 2:56 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> >
> > > Sent with Proton Mail secure email.
> > >
> > > On Sunday, July 28th, 2024 at 1:29 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > >
> > > > > Date: Sat, 27 Jul 2024 13:08:31 +0000
> > > > > From: Heime heimeborgia <at> protonmail.com
> > > > > Cc: 72309 <at> debbugs.gnu.org
> > > > >
> > > > > On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > > >
> > > > > > 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-width
> > > > > when setting mode-line-buffer-identification on propertized-buffer-identification.
> > > >
> > > > Use :eval.
> > >
> > > I have done it without success
> > >
> > > (defun vodil-rtgbfn (wmin)
> > > (setq-default mode-line-buffer-identification
> > > (propertized-buffer-identification (format " %%%db " wmin))))
> > >
> > > (vodil-rtgbfn 8)
> > >
> > > (setq-default mode-line-format
> > > '( "%e" (:eval (truncate-string-to-width mode-line-buffer-identification 13))
> > > vodil-panelit-bfselec))
> >
> >
> >
> > Have now done, but now the buffer name is not displayed. Why has there
> > to be so much torture to change the defaults !
> >
> > (defun vodil-tkbfn-ellipses (wmax)
> > "Get the buffer name truncated to WMAX width with ellipsis."
> >
> > (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))))
> >
> >
> > (defun vodil-tkbfn (wmax)
> > "Set mode-line-buffer-identification with WMAX maximum width."
> >
> > (setq-default mode-line-buffer-identification
> > '(:eval (vodil-tkbfn-ellipses wmax))))
> >
>
> 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.
> Can there be some additional commands to make this possibility less
> cumbersome. For instance, an option that gives mode-line-buffer-identification
> with truncation ellipses.
No.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 10:56:01 GMT)
Full text and
rfc822 format available.
Message #43 received at 72309 <at> debbugs.gnu.org (full text, mbox):
Sent with Proton Mail secure email.
On Sunday, July 28th, 2024 at 4:55 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sat, 27 Jul 2024 20:49:05 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: 72309 <at> debbugs.gnu.org, Eli Zaretskii eliz <at> gnu.org
> >
> > On Sunday, July 28th, 2024 at 3:27 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> >
> > > Sent with Proton Mail secure email.
> > >
> > > On Sunday, July 28th, 2024 at 2:56 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> > >
> > > > Sent with Proton Mail secure email.
> > > >
> > > > On Sunday, July 28th, 2024 at 1:29 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > >
> > > > > > Date: Sat, 27 Jul 2024 13:08:31 +0000
> > > > > > From: Heime heimeborgia <at> protonmail.com
> > > > > > Cc: 72309 <at> debbugs.gnu.org
> > > > > >
> > > > > > On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > > > >
> > > > > > > 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-width
> > > > > > when setting mode-line-buffer-identification on propertized-buffer-identification.
> > > > >
> > > > > Use :eval.
> > > >
> > > > I have done it without success
> > > >
> > > > (defun vodil-rtgbfn (wmin)
> > > > (setq-default mode-line-buffer-identification
> > > > (propertized-buffer-identification (format " %%%db " wmin))))
> > > >
> > > > (vodil-rtgbfn 8)
> > > >
> > > > (setq-default mode-line-format
> > > > '( "%e" (:eval (truncate-string-to-width mode-line-buffer-identification 13))
> > > > vodil-panelit-bfselec))
> > >
> > > Have now done, but now the buffer name is not displayed. Why has there
> > > to be so much torture to change the defaults !
> > >
> > > (defun vodil-tkbfn-ellipses (wmax)
> > > "Get the buffer name truncated to WMAX width with ellipsis."
> > >
> > > (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))))
> > >
> > > (defun vodil-tkbfn (wmax)
> > > "Set mode-line-buffer-identification with WMAX maximum width."
> > >
> > > (setq-default mode-line-buffer-identification
> > > '(:eval (vodil-tkbfn-ellipses wmax))))
> >
> > 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.
Could there be a bug. I have tried the various ideas and suggestions
and they did not work as others thought they would. One implementation
that worked (using (width rest)) got a lot of gripe and was turned down.
Se I am back to where I have started.
> > Can there be some additional commands to make this possibility less
> > cumbersome. For instance, an option that gives mode-line-buffer-identification
> > with truncation ellipses.
>
> No.
And people with small screen, what do they do ? With all the minor modes displaying
in the modeline, it becomes unusable (meaning that its contents goes beyond the window).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 12:19:01 GMT)
Full text and
rfc822 format available.
Message #46 received at 72309 <at> debbugs.gnu.org (full text, mbox):
Sent with Proton Mail secure email.
On Sunday, July 28th, 2024 at 10:55 PM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
>
>
>
>
>
> Sent with Proton Mail secure email.
>
>
> On Sunday, July 28th, 2024 at 4:55 PM, Eli Zaretskii eliz <at> gnu.org wrote:
>
> > > Date: Sat, 27 Jul 2024 20:49:05 +0000
> > > From: Heime heimeborgia <at> protonmail.com
> > > Cc: 72309 <at> debbugs.gnu.org, Eli Zaretskii eliz <at> gnu.org
> > >
> > > On Sunday, July 28th, 2024 at 3:27 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> > >
> > > > Sent with Proton Mail secure email.
> > > >
> > > > On Sunday, July 28th, 2024 at 2:56 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs <at> gnu.org wrote:
> > > >
> > > > > Sent with Proton Mail secure email.
> > > > >
> > > > > On Sunday, July 28th, 2024 at 1:29 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > > >
> > > > > > > Date: Sat, 27 Jul 2024 13:08:31 +0000
> > > > > > > From: Heime heimeborgia <at> protonmail.com
> > > > > > > Cc: 72309 <at> debbugs.gnu.org
> > > > > > >
> > > > > > > On Sunday, July 28th, 2024 at 1:00 AM, Eli Zaretskii eliz <at> gnu.org wrote:
> > > > > > >
> > > > > > > > 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-width
> > > > > > > when setting mode-line-buffer-identification on propertized-buffer-identification.
> > > > > >
> > > > > > Use :eval.
> > > > >
> > > > > I have done it without success
> > > > >
> > > > > (defun vodil-rtgbfn (wmin)
> > > > > (setq-default mode-line-buffer-identification
> > > > > (propertized-buffer-identification (format " %%%db " wmin))))
> > > > >
> > > > > (vodil-rtgbfn 8)
> > > > >
> > > > > (setq-default mode-line-format
> > > > > '( "%e" (:eval (truncate-string-to-width mode-line-buffer-identification 13))
> > > > > vodil-panelit-bfselec))
> > > >
> > > > Have now done, but now the buffer name is not displayed. Why has there
> > > > to be so much torture to change the defaults !
> > > >
> > > > (defun vodil-tkbfn-ellipses (wmax)
> > > > "Get the buffer name truncated to WMAX width with ellipsis."
> > > >
> > > > (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))))
> > > >
> > > > (defun vodil-tkbfn (wmax)
> > > > "Set mode-line-buffer-identification with WMAX maximum width."
> > > >
> > > > (setq-default mode-line-buffer-identification
> > > > '(:eval (vodil-tkbfn-ellipses wmax))))
> > >
> > > 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 12:32:02 GMT)
Full text and
rfc822 format available.
Message #49 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 12:52:01 GMT)
Full text and
rfc822 format available.
Message #52 received at 72309 <at> debbugs.gnu.org (full text, mbox):
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 ?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 14:09:02 GMT)
Full text and
rfc822 format available.
Message #55 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 28 Jul 2024 12:51:06 +0000
> From: Heime <heimeborgia <at> protonmail.com>
> Cc: 72309 <at> debbugs.gnu.org
>
> > > 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 ?
Not me, I don't have time for this, sorry. But I hope someone else
will.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 14:20:01 GMT)
Full text and
rfc822 format available.
Message #58 received at 72309 <at> debbugs.gnu.org (full text, mbox):
Sent with Proton Mail secure email.
On Monday, July 29th, 2024 at 2:07 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sun, 28 Jul 2024 12:51:06 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: 72309 <at> debbugs.gnu.org
> >
> > > > 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 ?
>
>
> Not me, I don't have time for this, sorry. But I hope someone else
> will.
Then all that discussion with me was a waste of your time. Saying
I am wrong but not sharing what you have in mind is a bad strategy.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 14:33:01 GMT)
Full text and
rfc822 format available.
Message #61 received at 72309 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 28 Jul 2024 14:19:30 +0000
> From: Heime <heimeborgia <at> protonmail.com>
> Cc: 72309 <at> debbugs.gnu.org
>
> > > > Your conclusions are wrong.
> > >
> > > If I put a question on emacs help, would you answer it in
> > > a way that gets things to work ?
> >
> >
> > Not me, I don't have time for this, sorry. But I hope someone else
> > will.
>
> Then all that discussion with me was a waste of your time. Saying
> I am wrong but not sharing what you have in mind is a bad strategy.
I said much more than that in this discussion.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#72309
; Package
emacs
.
(Sun, 28 Jul 2024 14:41:02 GMT)
Full text and
rfc822 format available.
Message #64 received at 72309 <at> debbugs.gnu.org (full text, mbox):
On Monday, July 29th, 2024 at 2:32 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Sun, 28 Jul 2024 14:19:30 +0000
> > From: Heime heimeborgia <at> protonmail.com
> > Cc: 72309 <at> debbugs.gnu.org
> >
> > > > > Your conclusions are wrong.
> > > >
> > > > If I put a question on emacs help, would you answer it in
> > > > a way that gets things to work ?
> > >
> > > Not me, I don't have time for this, sorry. But I hope someone else
> > > will.
> >
> > Then all that discussion with me was a waste of your time. Saying
> > I am wrong but not sharing what you have in mind is a bad strategy.
>
>
> I said much more than that in this discussion.
For a bug report, perhaps you did. Will see that emacs-help will get me,
although I have done that for a number of days now. And all suggestions
led nowhere. So the bug-report.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Thu, 02 Jan 2025 01:18:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Heime <heimeborgia <at> protonmail.com>
:
bug acknowledged by developer.
(Thu, 02 Jan 2025 01:18:03 GMT)
Full text and
rfc822 format available.
Message #69 received at 72309-done <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> 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.
This seems to be a support request and not a bug, so I'm closing this
bug now.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 30 Jan 2025 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.