all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52447@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <CAO48Bk8ht9orqWTPh0k0rECD1+7BjfAmNeY7Hfd=mDyVm6u+UA@mail.gmail.com> (raw)
In-Reply-To: <83bl1mp549.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

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@gnu.org> wrote:

> > From: Pedro Andres Aranda Gutierrez <paaguti@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

[-- Attachment #2: Type: text/html, Size: 2542 bytes --]

  reply	other threads:[~2021-12-12 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12  7:17 bug#52447: 29.0.50; New mode-line breaks calculations for last element in my mode-line Pedro Andres Aranda Gutierrez
2021-12-12  9:03 ` Eli Zaretskii
2021-12-12 17:58   ` Pedro Andres Aranda Gutierrez [this message]
2021-12-12 18:24     ` Eli Zaretskii
2021-12-13  6:06       ` Pedro Andres Aranda Gutierrez
2021-12-13 12:54         ` 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

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

  git send-email \
    --in-reply-to='CAO48Bk8ht9orqWTPh0k0rECD1+7BjfAmNeY7Hfd=mDyVm6u+UA@mail.gmail.com' \
    --to=paaguti@gmail.com \
    --cc=52447@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.