unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
@ 2023-09-23  8:04 Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-09-23  8:41 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-23  8:04 UTC (permalink / raw)
  To: 66167

Description:

The wrap-prefix text property with :align-to space keyword has been 
broken. (Regression).

To reproduce:

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-09-23  8:41 UTC (permalink / raw)
  To: Paul W. Rankin; +Cc: 66167

tags 66167 notabug wontfix
thanks

> Date: Sat, 23 Sep 2023 18:04:27 +1000
> From:  "Paul W. Rankin" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Description:
> 
> The wrap-prefix text property with :align-to space keyword has been 
> broken. (Regression).
> 
> To reproduce:
> 
> 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?).





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-23  9:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66167

On 2023-09-23 18:41, Eli Zaretskii wrote:
> tags 66167 notabug wontfix
> thanks
> 
>> Date: Sat, 23 Sep 2023 18:04:27 +1000
>> From:  "Paul W. Rankin" via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> Description:
>> 
>> The wrap-prefix text property with :align-to space keyword has been
>> broken. (Regression).
>> 
>> To reproduce:
>> 
>> 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..??





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
  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
  2023-09-24  4:56       ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-09-23  9:38 UTC (permalink / raw)
  To: Paul W. Rankin; +Cc: 66167

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
  2023-09-23  9:38     ` Eli Zaretskii
@ 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
  0 siblings, 1 reply; 6+ messages in thread
From: Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-24  4:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 66167

On 2023-09-23 19:38, Eli Zaretskii wrote:
> 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).

I see now what it means. Sorry, my mistake. And what I want can be 
achieved with (space :width 10). Thanks.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66167: 29.1; wrap-prefix text property with :align-to space keyword broken
  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
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2023-09-24  5:36 UTC (permalink / raw)
  To: Paul W. Rankin; +Cc: 66167-done

> Date: Sun, 24 Sep 2023 14:56:02 +1000
> From: "Paul W. Rankin" <hello@paulwrankin.com>
> Cc: 66167@debbugs.gnu.org
> 
> On 2023-09-23 19:38, Eli Zaretskii wrote:
> > 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).
> 
> I see now what it means. Sorry, my mistake. And what I want can be 
> achieved with (space :width 10). Thanks.

Yes, '(space :width 10)' is exactly what you want, AFAIU.

So I'm now closing this bug.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-24  5:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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