GNU bug report logs - #52129
29.0.50; Wish: Extend `:align-to center' to work on lines in buffer

Previous Next

Package: emacs;

Reported by: Arthur Miller <arthur.miller <at> live.com>

Date: Fri, 26 Nov 2021 20:22:01 UTC

Severity: normal

Tags: wontfix

Found in version 29.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arthur Miller <arthur.miller <at> live.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52129 <at> debbugs.gnu.org
Subject: bug#52129: 29.0.50; Wish: Extend `:align-to center' to work on lines in buffer
Date: Sun, 28 Nov 2021 11:38:18 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Arthur Miller <arthur.miller <at> live.com>
>> Cc: 52129 <at> debbugs.gnu.org
>> Date: Sun, 28 Nov 2021 00:40:30 +0100
>> 
>> > That's because it centers the first character of the string, not its
>> > middle character.
>> 
>> That too; so you see, it is not as simple to get it right by just prepending a
>> space with :align-to center property.
>
> We've been through this: you need to dynamically compute the pixel
> coordinate to align-to, as function of the string width.

Yes, I know. I just reflected further to say it wasn't "just" to add align-to
property but it needs more computations :).

But if you say it is one character at a time, and it is not much to do about it,
then it is not much more to be done about that.

>> >> Is there any way to make it aware of surrounding context, like entire line? Or
>> >> would that be too demanding computationally?
>> >
>> > I don't think I understand what you mean by "surrounding context", and
>> > what would it mean for it to "be aware" of it?
>> 
>> With context I meant simply the line, or at least part of the line to be
>> displayed. To be aware of it = to take it into consideration when displaying
>> line, so things like suggested would be possible.
>
> The display engine considers the line as a whole only when the entire
> screen line has been laid out, i.e. we get to a newline or the X
> coordinate is at the right edge of the window.  Before that, there's
> no information about the "line context".

So it would in principle mean, to render line twice, if such property would be
implemented, and that could be very expensive computation, so it is off the radar.




This bug report was last modified 3 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.