Subject: Re: bug#72485: Support 'visual-wrap-prefix-mode' in SHR/EWW

From: Eli Zaretskii <[email-masked]>
Date: Sun, 18 Aug 2024 21:12:09 +0300

> Date: Sun, 18 Aug 2024 09:58:07 -0700
> Cc: [email-masked]
> From: Jim Porter <[email-masked]>
> 
> *** New option 'shr-fill-text'.
> When non-nil (the default), SHR will insert newlines in text to wrap it.
> If customized to nil, SHR will leave the text as-is; in that case, EWW
> will automatically enable 'visual-line-mode' to visually wrap the text
> when displaying a page.

Inserting newlines is not the important part of this variable's
effect.  The important part is filling the text, and shr does that
with fixed-pitch and variable-pitch fonts alike.  The NEWS entry
should describe this important part.

> *** EWW now enables 'visual-wrap-prefix-mode' when 'shr-fill-text' is nil.
> When 'shr-fill-text' is customized to nil, EWW now enables
> 'visual-wrap-prefix-mode' when rendering in addition to
> 'visual-line-mode'.  This improves the display of multiline, indented
> text, such as block quotes or (un)ordered lists.

I evidently fail to explain myself, so let me just propose an entry
as I envisioned it:

 *** EWW now enables 'visual-wrap-prefix-mode' when 'shr-fill-text' is nil.
 By default, 'shr-fill-text' is t, and EWW fills the text according to
 the width of the window.  If you customize 'shr-fill-text' to nil,
 EWW will now automatically turn on 'visual-wrap-prefix-mode' in
 addition to 'visual-line-mode', so that long lines are wrapped at
 word boundaries near window edge and the continuation lines are
 indented using prefixes computed from surrounding context.