--- Begin Message ---
Subject: |
30.0.50; shr - Preserve indentation when shr-fill-text is nil |
Date: |
Mon, 04 Mar 2024 23:02:27 +0100 |
Hello,
I am a grateful and happy user of the new shr-fill-text option; one nit
I have with its current implementation is that, since setting it to nil
essentially short-circuits shr-fill-lines, we skip shr-fill-line, which
actually handles both filling *and* indentation.
This is very noticeable when reading HTML emails with Gnus: citations in
blockquotes become indistinguishable from the actual reply. See
eww-current.png for a demonstration with EWW:
* left is shr-fill-text t (default),
* right is shr-fill-text nil and visual-line-fringe-indicators
'(left-curly-arrow right-curly-arrow).
The attached patch makes it so that shr applies indentation before it
consult the shr-fill-text option and skips filling. See eww-patch.png
for a demonstration:
* left is shr-fill-text nil and visual-line-fringe-indicators
'(left-curly-arrow right-curly-arrow),
* right is the same, plus visual-wrap-prefix-mode,
* not pictured (unchanged): shr-fill-text t (default).
This patch also adds a rendering testcase, and teaches the rendering
test to re-run testcases while setting extra user options to make sure
they do not impact rendering.
Curious to hear your thoughts. Will post an updated patch once I have a
bug number to replace the "bug#TODO" placeholders.
Thanks!
0001-Keep-indenting-text-when-shr-fill-text-is-nil-bug-TO.patch
Description: Text Data
eww-current.png
Description: PNG image
eww-patch.png
Description: PNG image
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.39, cairo version 1.18.0) of 2024-01-06 built on amdahl30
Repository revision: 657275529e31226bbc6c92eb7f7af887474a0bb8
Repository branch: master
Windowing system distributor 'SUSE LINUX', version 11.0.12302004
System Description: openSUSE Tumbleweed
Configured using:
'configure --prefix=/home/peniblec/apps/emacs --with-cairo
--with-sqlite3 --with-xinput2'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil |
Date: |
Fri, 15 Mar 2024 08:10:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
>> Cc: 69555@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
>> Date: Wed, 13 Mar 2024 22:41:32 +0100
>>
>> Eli, am I clear to push & close?
>
> Yes, but please fix the following nits before installing:
>
> . use only ASCII characters in the commit log message
(ACK; FWIW I did check the repo log for a precedent when adding those
ellipses. Wondering if build-aux/git-hooks/commit-msg ought to report
this? It does seem to explicitly check for non-UTF-8)
> . make sure lines in the commit log message do not exceed 65 columns
(ACK; can't remember where I got my 70-odd filling came from, CONTRIBUTE
does explicitly mention "63". Maybe I got confused with the concurrent
discussion on emacs-devel)
> Thanks.
Nits picked, patch pushed, closing. Thank you both for the review!
--- End Message ---