From: Eli Zaretskii <eliz@gnu.org>
To: "Paul W. Rankin" <hello@paulwrankin.com>
Cc: 66167@debbugs.gnu.org
Subject: bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
Date: Sat, 23 Sep 2023 12:38:34 +0300 [thread overview]
Message-ID: <83v8c144bp.fsf@gnu.org> (raw)
In-Reply-To: <f4b138cc0619986ab3bdcbaa712316b1@purelymail.com> (hello@paulwrankin.com)
> Date: Sat, 23 Sep 2023 19:24:25 +1000
> From: "Paul W. Rankin" <hello@paulwrankin.com>
> Cc: 66167@debbugs.gnu.org
>
> On 2023-09-23 18:41, Eli Zaretskii wrote:
> >> 1. emacs -Q
> >> 2. in *scratch*, ensure visual-line-mode is enabled
> >> 3. insert enough text to wrap lines
> >> 4. M-: (put-text-property (point-min) (point-max) 'wrap-prefix '(space
> >> :align-to 10))
> >>
> >> Expected results:
> >>
> >> Wrapped text should align to column 10.
> >>
> >> Actual result:
> >>
> >> Wrapped text does not align. (No effect.)
> >
> > This is not a bug. The argument of :align-to specifies a column
> > number, and the column number does not get reset when the line wraps
> > or the window is hscrolled. IOW, the column number is measured from
> > the beginning of the physical line, not from the beginning of the
> > screen line.
> >
> > The previous code handled this incorrectly and inconsistently, and was
> > fixed in Emacs 29 (or was it 28?).
>
> You're suggesting that the wrap-prefix should not be applied to wrapped
> lines..??
It _is_ applied. Try giving wrap-prefix a value that is a string, and
you will see that it is applied.
The problem is not with wrap-prefix, the problem is with the
(space :align-to 10) form, and specifically with the value 10.
The value 10 is too small for wrapped lines (in most cases).
next prev parent reply other threads:[~2023-09-23 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 8:04 bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 8:41 ` Eli Zaretskii
2023-09-23 9:24 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-23 9:38 ` Eli Zaretskii [this message]
2023-09-24 4:56 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 5:36 ` 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
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=83v8c144bp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=66167@debbugs.gnu.org \
--cc=hello@paulwrankin.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).