all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martianhiatus@riseup.net
To: help-gnu-emacs@gnu.org
Subject: Re: right aligning a string, using display (space :align-to
Date: Fri, 20 Oct 2023 22:05:40 +0200	[thread overview]
Message-ID: <f47d79a6-0d57-4baa-aac3-089b67a3bc06@riseup.net> (raw)

(pls cc me so i can easily respond / quote)

> You assume that string-pixel-width takes text-scaling into account?  I
> don't think it does; you should use window-text-pixel-size or
> buffer-text-pixel-size instead.  That's because text-scaling is a
> buffer-local feature, and string-pixel-width is not told which buffer
> you have in mind.

I'm just asking for any help i can get regarding how to right-align a string in a way that isn't broken by text-scaling. i don't know how to go about it.

i'm only using string-pixel-width because i thought i needed to subtract it from "right" in the pixel-width spec, as quoted previously. i don't see how the window or buffer functions can help with that that, as i'd have to subtract my string's pixel width from them, so they'd need to replace "right", rather than my string width calculation, it seems to me. perhaps you had in mind another way to use them, but didn't say.




             reply	other threads:[~2023-10-20 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 20:05 martianhiatus [this message]
2023-10-21  6:35 ` right aligning a string, using display (space :align-to Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2023-10-20 16:06 martianhiatus
2023-10-20 18:06 ` Eli Zaretskii
2023-10-19 18:05 martianhiatus
2023-10-20  6:41 ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f47d79a6-0d57-4baa-aac3-089b67a3bc06@riseup.net \
    --to=martianhiatus@riseup.net \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.