GNU bug report logs - #46476
Feature request: Right-aligning part of the modeline

Previous Next

Package: emacs;

Reported by: Paweł Kraśnicki <paul.krasnicki <at> gmail.com>

Date: Sat, 13 Feb 2021 01:08:02 UTC

Severity: wishlist

Tags: confirmed

Full log


Message #14 received at 46476 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paweł Kraśnicki <paul.krasnicki <at> gmail.com>
Cc: 46476 <at> debbugs.gnu.org
Subject: Re: bug#46476: Feature request: Right-aligning part of the modeline
Date: Sat, 13 Feb 2021 18:58:59 +0200
> From: Paweł Kraśnicki <paul.krasnicki <at> gmail.com>
> Date: Sat, 13 Feb 2021 17:30:16 +0100
> Cc: 46476 <at> debbugs.gnu.org
> 
> > Can you describe how is this done in Lisp?
> 
> Sure. The most common solution is to use a text property that displays a space
> with the `:align-to' property. Here's a simplified version of the code from the
> popular `powerline' package:

If people use :align-to, then what would be the advantage of providing
%-constructs to produce the same?

> > 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?
> 
> I'm not sure. With the current Lisp solutions, the modeline gets chopped on the
> right too, and it seems that people either don't mind that at all, or they use
> custom "segment" logic. The idea here is that the modeline is composed of a few
> segments, with each having a priority number. As the window shrinks, the
> segments get hidden in discrete jumps starting from the lowest priority, until
> only the segment(s) with the highest priority number remain. I think there may
> not be any demand for an intermediate solution that would let the user configure
> hiding with granularity of left/center/right.

That'd require two passes to generate the mode-line display, right?




This bug report was last modified 4 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.