From: Eli Zaretskii <eliz@gnu.org>
To: Arthur Miller <arthur.miller@live.com>
Cc: 52129@debbugs.gnu.org
Subject: bug#52129: 29.0.50; Wish: Extend `:align-to center' to work on lines in buffer
Date: Sat, 27 Nov 2021 07:59:33 +0200 [thread overview]
Message-ID: <83o86616m2.fsf@gnu.org> (raw)
In-Reply-To: <AM9PR09MB497715F879C9F1AF7E74040E96639@AM9PR09MB4977.eurprd09.prod.outlook.com> (message from Arthur Miller on Fri, 26 Nov 2021 21:01:11 +0100)
> From: Arthur Miller <arthur.miller@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.
next prev parent reply other threads:[~2021-11-27 5:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 20:01 bug#52129: 29.0.50; Wish: Extend `:align-to center' to work on lines in buffer Arthur Miller
2021-11-27 5:59 ` Eli Zaretskii [this message]
2021-11-27 8:47 ` Arthur Miller
2021-11-27 9:15 ` Eli Zaretskii
2021-11-27 11:06 ` Arthur Miller
2021-11-27 11:25 ` Eli Zaretskii
2021-11-27 23:40 ` Arthur Miller
2021-11-28 7:48 ` Eli Zaretskii
2021-11-28 10:38 ` Arthur Miller
2021-11-29 15:59 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83o86616m2.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=52129@debbugs.gnu.org \
--cc=arthur.miller@live.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).