GNU bug report logs - #72485
Support 'visual-wrap-prefix-mode' in SHR/EWW

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Tue, 6 Aug 2024 03:49:02 UTC

Severity: normal

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Porter <jporterbugs <at> gmail.com>
Subject: bug#72485: closed (Re: bug#72485: Support 'visual-wrap-prefix-mode'
 in SHR/EWW)
Date: Sun, 18 Aug 2024 23:13:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 72485 <at> debbugs.gnu.org.

-- 
72485: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72485
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72485-done <at> debbugs.gnu.org
Subject: Re: bug#72485: Support 'visual-wrap-prefix-mode' in SHR/EWW
Date: Sun, 18 Aug 2024 16:10:15 -0700
On 8/18/2024 11:53 AM, Eli Zaretskii wrote:
> LGTM, thanks.
> 
>> (If you think this makes the Emacs 31 NEWS entry partially redundant, I
>> can try to trim that one down to only discuss the new additions, but I
>> don't mind either way.)
> 
> I see no reason to trim it.

Thanks. Merged the NEWS update to the release branch as b54e8b3741b, and 
the main patch to the master branch as a876c4d7a17. Closing this bug now.

[Message part 3 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Support 'visual-wrap-prefix-mode' in SHR/EWW
Date: Mon, 5 Aug 2024 20:47:52 -0700
[Message part 4 (text/plain, inline)]
This patch is an extension of bug#71605, and the first place to 
explicitly use the new variable-pitch support for 
'visual-wrap-prefix-mode'. While implementing this, I found two small 
bugs in the new 'visual-wrap-prefix-mode' code:

1. When setting the min-width for the first line prefix, we should use 
'add-display-text-property' so as not to clobber other display properties.

2. My attempts to be "helpful" by special-casing wrap-prefixes of all 
spaces ended up just interfering with more complex cases (like SHR), so 
I removed it. The code is now simpler (one fewer condition) and just 
works more smoothly overall.

There's one limitation to this patch though: since SHR uses absolute 
pixel-widths for indenting internally, things can look mis-indented if 
you scale the text in the buffer. However, SHR has exactly the same 
issue when *not* using 'visual-wrap-prefix-mode', so it's really just a 
more-general bug in SHR. (It'd be nice to fix that, but I'd have to get 
a better understanding of how indentation and <table> elements interact.)

Attached is a test HTML page that shows off the indentation. You can see 
the results by running:

  emacs -Q --eval '(progn (setq shr-fill-text nil) (eww "test.html"))'

(And also compare to the default behavior where 'shr-fill-text' is non-nil.)
[0001-Improve-SHR-EWW-support-for-visual-wrap-prefix-mode.patch (text/plain, attachment)]
[test.html (text/html, attachment)]

This bug report was last modified 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.