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 09:28:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

> 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.  If
that's not possible with :align-to specs, then I'd use some other
feature to implement the centering.

As I mentioned in my initial email, it's entirely possible to center
text in Emacs today, even by just inserting spaces.  But that doesn't
update automatically when text or window size changes; those spaces (or
:align-to specs, in your proposal - they're basically the same) need to
be updated by Lisp code running in post-command-hook or elsewhere, as
you say.

I want this centering display to be handled by the display engine, as
other similar things are.




reply via email to

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