[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46476: Feature request: Right-aligning part of the modeline
From: |
Eli Zaretskii |
Subject: |
bug#46476: Feature request: Right-aligning part of the modeline |
Date: |
Sat, 13 Feb 2021 10:18:11 +0200 |
> From: Paweł Kraśnicki
> <paul.krasnicki@gmail.com>
> Date: Fri, 12 Feb 2021 23:59:26 +0100
>
> Many people who use Emacs with significant customization have their modeline
> split into left and right aligned parts. I've also seen the Lisp code for this
> in several packages.
Can you describe how is this done in Lisp?
> I think it would be useful to have this feature as a
> %-construct so that the users who want it wouldn't have to install a package
> or
> write custom Lisp that uses the `display' text property.
>
> Everything after this construct would be aligned to the right. For example,
> assuming the construct was %=, the mode-line-format
>
> "l%=r"
>
> would cause the modeline in a 20 character wide window to look like
>
> l r
>
> It could also be useful to generalize this to centering, though I've seen this
> used less often. Then, the mode-line-format
>
> "lllll%=c%=r"
>
> would cause the modeline to look like
>
> lllll c r
The immediate question about this I have is what to do when the
mode-line string is too long for the window's width? Right now, we
simply chop the stuff on the right that doesn't fit, but if the
mode-line string has 2 or 3 different part, that should be revised,
right?