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: Allen Li
Subject: bug#30056: 25.3; battery-mode-line-string missing leading space
Date: Wed, 10 Jan 2018 15:26:42 -0800

On Wed, Jan 10, 2018 at 11:05 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Glenn Morris <rgm@gnu.org>
>> Cc: Allen Li <vianchielfaura@gmail.com>,  30056@debbugs.gnu.org
>> Date: Wed, 10 Jan 2018 12:06:47 -0500
>>
>> M-x display-time-mode
>> M-x display-battery-mode
>>
>> -> 9.05AM 0.45 Mail[100.0%]
>>
>> See also https://debbugs.gnu.org/18164
>
> We don't do this consistently in the modes which use
> global-mode-string: some of them leave a blank at the beginning,
> others (the majority, AFACT) don't.  There's not much space on the
> mode line, so I'm not sure which way is better.

The standard for minor mode strings is to include a leading space, right?

That seems like the right approach for global-mode-strings, which also
follows an "append" pattern like minor modes.

>From what I can grok, the general standard of the mode line is to use
spaces at the end for "top level" mode line items (mode-line-modes,
mode-line-position) and spaces at the beginning for sub items (minor
modes, the parts inside mode-line-position).

In any case, Emacs packages should probably be consistent, and
currently display-battery-mode and display-time-mode are inconsistent.
I don’t know which other modes use global-mode-string; is display-time
mode the only outlier?

> But if we want to have a separation there, would it make sense to do
> this in bindings.el, so that global-mode-string is always separated by
> a blank from the preceding text, and modes don't have to remember this
> gork?





reply via email to

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