GNU bug report logs - #52447
29.0.50; New mode-line breaks calculations for last element in my mode-line

Previous Next

Package: emacs;

Reported by: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>

Date: Sun, 12 Dec 2021 07:19:01 UTC

Severity: normal

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52447 <at> debbugs.gnu.org
Subject: Re: bug#52447: 29.0.50; New mode-line breaks calculations for last
 element in my mode-line
Date: Sun, 12 Dec 2021 18:58:48 +0100
[Message part 1 (text/plain, inline)]
Hi Eli,

Doesn't this mean that there will be a 'bug' in emacs28 ;-) Just kidding...
thanks a lot for the analysis.
It was code I found time ago and I had really forgotten how it worked (or
didn't work).
Now that I(you) have fixed it for fixed-pitch I don't think I'm prepared
for a variable pitch font in the mode line yet. I still find it ugly.

Best, /PA

On Sun, 12 Dec 2021 at 10:03, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>
> > Date: Sun, 12 Dec 2021 08:17:28 +0100
> >
> > I'm using the attached code for my mode-line. It's inspired by the doom
> mode-line. My last element is
> > right-aligned and shows GIT information when relevant. On emacs < 29,
> the calculation for the free space
> > avoids overlapping with the fringe:
> > emacs28-modeline.png
> >
> > On emacs29, with fixed font using the fix from etc/NEWS, the fringe
> overlaps with the vc information.
> > emacs29-broken-modeline.png
>
> Your code says:
>
>   (defun fill-spaces (len)
>     `((space :align-to (- (+ right right-fringe right-margin) ,len))))
>
> This tells Emacs to right-align the string to the place _after_ the
> margin and the fringe.  If I remove the addition of right-fringe and
> right-margin from the :align-to expression, the effect is like you
> want.
>
> So it sounds like Emacs 28 and before had some bug in this area which
> was fixed in Emacs 29, and your code needs to adapt by removing the
> "fix" you had in previous Emacs versions.
>
> > Not to speak variable pitch, where I only see the first 1.5 letters or
> so (depending on the branch I'm in)
>
> For variable-pitch font, you need to calculate this in pixels, not in
> columns.
>


-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 158 days ago.

Previous Next


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