Subject: Re: bug#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode'

From: Jim Porter <[email-masked]>
Date: Thu, 20 Jun 2024 10:36:23 -0700

On 6/20/2024 2:58 AM, Eli Zaretskii wrote:
> Should be fixed now on the master branch.

Thanks, it all seems to work now.

I think I have a way forward to implement this that should avoid issues, 
though it's a bit more complex than I'd initially thought. I think there 
are three cases:

"* here is some text":
   Text                    Properties
   "* "                    (display (min-width (2)))
   "here is some text"     (wrap-prefix (space :align-to 2))

"  here is some text":
   Text                    Properties
   "  "                    (display "")
   "  here is some text"   (line-prefix (space :align-to 2)
                            wrap-prefix (space :align-to 2))

"// here is some text" (in c-mode):
   Text                    Properties
   "// here is some text"  (wrap-prefix "// ")

(The last case is just doing what visual-wrap-prefix-mode currently 
does.) I'm pretty sure all these should be unproblematic in the 
scenarios Po Lu mentioned. The only case I haven't considered is how 
this interacts with 'visual-wrap-extra-indent'. I'll have to think about 
that some more.