emacs-devel
[Top][All Lists]
Advanced

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

Re: Horizontal centering in the display engine


From: Eli Zaretskii
Subject: Re: Horizontal centering in the display engine
Date: Wed, 14 Apr 2021 17:42:28 +0300

> From: sbaugh@catern.com
> Date: Wed, 14 Apr 2021 09:28:53 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >> > E.g., are you planning on centering each line separately, or
> >> > everything together, or something else?
> >> 
> >> Each line separately.
> >
> > So each line should have a different value of :align-to?
> 
> If they each had a different value of :align-to, then I'd have to update
> those values of align-to every time text size or window size changes,
> which is something I want to avoid.

No, you only need to update them when the length of some of the lines
changes.  That is why the values are different for each line: the
lines will usually have different lengths, and that length is part of
the value of :align-to.  Right?

> > And if we go one level higher, I guess you intend to write a
> > post-command-hook that recalculates the :align-to specs whenever text
> > changes, is that right?  Or how did you plan on taking text changes
> > into consideration?
> 
> No, I want my :align-to specs to stay the same as text changes.

You want the display engine to evaluate the function call for you?
That's not possible at the moment, the expression language accepted by
:align-to is somewhat limited.  It can automatically react to changes
in a variable's value, but in that case it must be the same variable
for all the lines, and that contradicts what you want to do.



reply via email to

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