GNU bug report logs -
#69555
30.0.50; shr - Preserve indentation when shr-fill-text is nil
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: Rahguzar <rahguzar <at> zohomail.eu>
>> From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
>> Date: Mon, 04 Mar 2024 23:08:20 +0100
>>
>> Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
>>
>> > Will post an updated patch once I have a
>> > bug number to replace the "bug#TODO" placeholders.
>>
>> See attached.
>
> The change in behavior is unconditional, AFAIU. Should we have a
> separate knob for that? Perhaps someone out there doesn't want text
> to be indented when shr-fill-text is nil?
Perhaps; I could look into adding that knob. FWIW nothing in the
original feature request (bug#66676) gives me the impression that this
new option should affect indentation; the stated motivation was:
> 1) Using `visual-line-mode` for line wrapping. I think this is more
> natural for html and makes resizing windows work more nicely.
That's why I interpret the indentation change as a side-effect; curious
to hear Rahguzar's thoughts though.
Another reason I'm not overly fond of adding another knob is figuring
out what should happen if a user keeps shr-fill-text set to t, but sets
that hypothetical indentation option to nil. Should we support that?
Or should shr-fill-text become a tri-state? (nil, 'indent-only, t)
I'm open to biting the bullet, but I'd also like to make sure we don't
sophisticate shr.el further than we want to.
> Also, please time the code on some substantially large body of text,
> with and without shr-fill-text, and compare that with the current
> version. I think performance is an important aspect of any change in
> this area.
Can do; would "(elisp) Profiling" be the starting point? (For all my
list lurking, I confess my eyes have always glossed over discussions
involving benchmarks)
(Also wondering if we have any "standard" or preferred HTML documents or
websites to throw at shr.el for benchmarking purposes; if not, I guess
I'll peruse <https://en.wikipedia.org/wiki/Special:LongPages> 🤔)
Thanks for the review!
This bug report was last modified 1 year and 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.