GNU bug report logs -
#52129
29.0.50; Wish: Extend `:align-to center' to work on lines in buffer
Previous Next
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
Message #8 received at 52129 <at> debbugs.gnu.org (full text, mbox):
> From: Arthur Miller <arthur.miller <at> live.com>
> Date: Fri, 26 Nov 2021 21:01:11 +0100
>
> I am not sure if the title is descriptive enough, or even correct, but as seen
> from attached code and image, I am trying to align two strings in a center of
> each strings line.
>
> It works now when string-pixel-width correctly calculates pixel widths. However,
> I would prefer if I could just use :align-to center as a spec for a string as
> property. Currently we have to use space as a spacer as we used to use
> gif-spacers back in time.
>
> I am not sure about how semantics would work, there are several cases to
> consider, but generally if a string or a stretch of text in a string were given
> text property 'display '(:align-to center), then Emacs would align that stretch
> of text in the middle of the line that text occupies.
I don't understand what exactly are you asking for. Is your problem
that you have to prepend some character to the string and put the
:align-to spec on that character? Because AFAIU that simple measure
should achieve your goal. If that's not what you want, or if what I
described doesn't work, please show some simple code to explain your
requests.
This bug report was last modified 3 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.