GNU bug report logs - #64851
30.0.50; mode-line right align and vertical scroll-bars

Previous Next

Package: emacs;

Reported by: German Pacenza <germanp82 <at> hotmail.com>

Date: Tue, 25 Jul 2023 11:12:02 UTC

Severity: normal

Tags: notabug

Found in version 30.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: German Pacenza <germanp82 <at> hotmail.com>, Hugo Heagren <hugo <at> heagren.com>
Cc: 64851 <at> debbugs.gnu.org
Subject: bug#64851: 30.0.50; mode-line right align and vertical scroll-bars
Date: Tue, 25 Jul 2023 16:39:40 +0300
> From: German Pacenza <germanp82 <at> hotmail.com>
> Date: Tue, 25 Jul 2023 08:06:11 -0300
> 
> 
> emacs -Q:
> (scroll-bar-mode 0)
> (setq-default mode-line-format '(""
>                                  mode-line-format-right-align
>                                  mode-line-position))
> Visit a very large file like xdisp.c and move to eob.
> The line number get truncated.

Personally, I think the only reasonable response to this report is
"Don't do that".  The value of mode-line-position accounts only for 4
digits in the line number (it uses min-width 5.0, with one character
taken up by the leading "L"), and that is insufficient for buffers
larger that 9999 lines.  So if this is what you want, i.e. you want
mode-line-position to be the last part of the mode line, you need to
redefine mode-line-position to support more digits in the line number.

There seems to be an off-by-one error in the alignment computed by
mode--line-format-right-align, though, because adding one more space
to mode-line-position is insufficient to show the full 5 digits of
xdisp.c's line numbers: one needs two extra place, not one.  I hope
Hugo (CC'ed) will be able to find this minor mistake.

Thanks.




This bug report was last modified 1 year and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.