unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Paweł Kraśnicki" <paul.krasnicki@gmail.com>
Cc: 46476@debbugs.gnu.org
Subject: bug#46476: Feature request: Right-aligning part of the modeline
Date: Sat, 13 Feb 2021 10:18:11 +0200	[thread overview]
Message-ID: <83ft20e5z0.fsf@gnu.org> (raw)
In-Reply-To: <CAPZgK760cvavCQm0RDY=J_O-F8EtsOnnOi-=B3C6jHMUz8inXQ@mail.gmail.com> (paul.krasnicki@gmail.com)

> 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?





  reply	other threads:[~2021-02-13  8:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 22:59 bug#46476: Feature request: Right-aligning part of the modeline Paweł Kraśnicki
2021-02-13  8:18 ` Eli Zaretskii [this message]
2021-02-13 16:30   ` Paweł Kraśnicki
2021-02-13 16:58     ` Eli Zaretskii
2021-02-13 17:45       ` Paweł Kraśnicki
2021-02-13 18:08         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ft20e5z0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=46476@debbugs.gnu.org \
    --cc=paul.krasnicki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).