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: sbaugh
Subject: Re: Horizontal centering in the display engine
Date: Wed, 14 Apr 2021 11:25:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:
> 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?

Oh, that's true, I only need to update them when the length of the line
changes.

>> > 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.

Yes, that makes sense.  So I'm asking about how difficult it would be to
add a new element to the :align-to expression language, one which
specifies the width of the current line.  Arbitrary function calls is
not necessary for what I want, just something specifically for the width
of the current line, in the same way there's already elements for
left-fringe etc.




reply via email to

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