[Top][All Lists]

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

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

From: Lars Ingebrigtsen
Subject: bug#30056: 25.3; battery-mode-line-string missing leading space
Date: Mon, 10 Aug 2020 15:43:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Allen Li <vianchielfaura@gmail.com> writes:

> The cause of this odd behavior is that display-battery-mode appends
> and removes its symbol in global-mode-string when it is toggled on or
> off, while display-time-mode only appends its symbol and does not
> remove it when it is toggled off.  The reason display-battery-mode
> comes first after Emacs starts is because of how the custom file
> works; user options are sorted alphabetically and display-battery-mode
> comes first, so it is appended first.
> Naturally, this has some implications for whether each display uses
> leading, trailing, or no space.

Indeed.  Just a random idea: Would it make sense to add a mode line
construct like "%S" to mode-line-format that means "put a space here if
there isn't one already"?  Then battery could put "%S<current string"
into the list?

Would that work?

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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