[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tick Reduction

From: Lars Ingebrigtsen
Subject: Re: Tick Reduction
Date: Fri, 19 Nov 2021 09:30:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Using proportional fonts on the mode line will cause annoying
> horizontal shifts when, say, "--" is replaced with "**" or ""%%" is
> replaced with "%*", or when the line number changes or the time shown
> in the mode line changes.  So if we want to use such fonts there and
> avoid such shifts, we will need to treat the mode line as a kind of
> table, where each part starts at a horizontal position that is aligned
> at pixelwise resolution.  We'll probably need to see what this means
> for the current implementation of mode-line display, especially with
> those :eval parts.

Yes, we've previously discussed adding a new type of mode line spec, but
I don't think we got all the way there in how it's supposed to work, so
perhaps we could just continue that discussion here?  😀

So, to recap: We'd like to be able to ensure that the mode line elements
don't change width all the time, because that'd be annoying.  Some fonts
have digits that are of uneven width -- this is very rare, but they do
exist, and that would make column number mode change the width all the

I think my suggestion was to add a spec that says "this bit of the mode
line should take at least x pixels" (or "y times the width of the x
character").  This would fix the issue with the column indicator.

And...  I think that also fixes the issue with "--" changing to "**"?
That is, we'd have something like:

(defvar-local mode-line-mule-info
    (:min-space 5
      (:propertize ("" current-input-method-title)

For instance.  That is, I don't think we have to go full table on
this -- the number of affected mode line elements isn't large.  (And I
don't think we can go to a table based lineup, because the mode line
format is just too variable.)

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]