Subject: Re: bug#21207: 25.0.50; Cursor position behaves unpredictably on the 'display text property

From: Artur Malabarba <[email-masked]>
Date: Fri, 7 Aug 2015 20:56:38 +0100

2015-08-07 20:04 GMT+01:00 Eli Zaretskii <[email-masked]>:
>> Date: Fri, 7 Aug 2015 19:31:29 +0100
>> From: Artur Malabarba <[email-masked]>
>> Cc: [email-masked]
>>
>> I'm using this to visually wrap some lines, but not others (as part of
>> rewriting longlines-mode to work without editing the buffer).
>> I can wrap only the lines I want by doing the procedure in item 2 (displaying a
>> space as a newline). When the line I'm wrapping happens to be indented, I have
>> to use the procedure in item 4 (so the second line gets indented too), and it's
>> mildly annoying that I can't place the cursor at the end of the line.
>
> Can you use line-prefix and/or wrap-prefix for that?

Thanks. That works if I place the line-prefix at the char after the
space, so it looks like it's enough.

> It should be possible to support the 'cursor' property on a newline
> inside a display string, but not inside an overlay string.  Not sure
> if this disparity will not cause confusion and resistance, as we
> generally try to support the same features in both cases.
>
> In general, I hoped that line wrap at some constant column other than
> the window edge (which is what I understand you are trying to do) will
> be implemented on the display engine level, where IMO it belongs, not
> by using display properties and such likes.

That makes sense. Would it still be possible to make that depend on a
predicate defined in a lisp variable? Or would the display engine run
too deep for that?