bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30056: 25.3; battery-mode-line-string missing leading space


From: Juri Linkov
Subject: bug#30056: 25.3; battery-mode-line-string missing leading space
Date: Tue, 27 Jul 2021 02:09:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> This change broke tab-bar.el that expected that the default value of
>> mode-line-misc-info contains (global-mode-string ("" global-mode-string " 
>> ")).
>
> I've now updated the code in tab-bar.el.  But isn't that a brittle way
> to enable this?  The user may have altered the variable value, for instance.

This code is just for convenience to avoid duplication of the global string
on the mode-line and on the tab-bar.  When the user alters mode-line-misc-info
manually, then we can assume that the user does this intentionally,
e.g. to force duplication of the global string, etc.

But the default value of mode-line-misc-info doesn't change too often,
so there is no problem.

However, there is another problem: now display-time-string contains
additional trailing space, so when time is displayed on the
right edge on the tab-bar, time string is not aligned nicely anymore.
Now there is the gap between the time string and the right edge of the tab-bar.

How this could be avoided?  Maybe tab-bar-format-global now needs
to use 'string-trim' on the result of '(format-mode-line global-mode-string)'?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]