Subject: Re: bug#31666: Bad interaction between visual-line-mode and wrap-prefix on long lines

From: Clément Pit-Claudel <[email-masked]>
Date: Fri, 8 Jun 2018 15:32:38 -0400

On 2018-06-08 15:24, Eli Zaretskii wrote:
>> Date: Fri, 08 Jun 2018 21:32:03 +0300
>> From: Eli Zaretskii <[email-masked]>
>> Cc: [email-masked]
>>
>>> Cc: [email-masked]
>>> From: Clément Pit-Claudel <[email-masked]>
>>> Date: Fri, 8 Jun 2018 14:04:16 -0400
>>>
>>> How hard would it be to introduce a no-break text property?
> 
> Btw, would it be OK to use some non-ASCII whitespace character in
> these situations?  For example, you could use u+2002 (or even NBSP,
> u+0A0, if you reset nobreak-char-display to nil).

Maybe! Org-mode doesn't currently support it (it's fontification rules don't consider that case), but they could be changed.

One additional remark, which may explain why originally I attributed the issue to wrap-prefix.  The case in which the issue tends to be the most perceptible is when using org-mode with long URLs as titles and with adaptive-wrap-prefix-mode.  In that case, starting from

  |***** https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31666

shrinking the window wraps like this:

  |***** 
  |      https://debbugs.gnu.org/cgi/bugre
  |      port.cgi?bug=31666

In that case, wrapping around the first space doesn't help, because the wrap prefix causes us to resume at exactly the same column on the next line.