bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66167: 29.1; wrap-prefix text property with :align-to space keyword


From: Eli Zaretskii
Subject: bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
Date: Sat, 23 Sep 2023 12:38:34 +0300

> 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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]