[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil
From: |
Kévin Le Gouguec |
Subject: |
bug#69555: 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
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil,
Kévin Le Gouguec <=
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Kévin Le Gouguec, 2024/03/04
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Eli Zaretskii, 2024/03/05
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Kévin Le Gouguec, 2024/03/05
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Eli Zaretskii, 2024/03/05
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Kévin Le Gouguec, 2024/03/05
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Eli Zaretskii, 2024/03/06
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Kévin Le Gouguec, 2024/03/06
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Eli Zaretskii, 2024/03/07
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Rahguzar, 2024/03/06
- bug#69555: 30.0.50; shr - Preserve indentation when shr-fill-text is nil, Kévin Le Gouguec, 2024/03/13