GNU bug report logs - #77299
eww-auto-rename-buffer 'title interaction with eww-readable-urls

Previous Next

Package: emacs;

Reported by: Keith Amidon <camalot <at> picnicpark.org>

Date: Thu, 27 Mar 2025 04:48:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Keith Amidon <camalot <at> picnicpark.org>
To: Jim Porter <jporterbugs <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 77299 <at> debbugs.gnu.org
Subject: bug#77299: eww-auto-rename-buffer 'title interaction with eww-readable-urls
Date: Thu, 12 Jun 2025 05:38:51 -0700
On 6/11/25 15:17, Jim Porter wrote:
> I think we could change how we return the readable form of the 
> document. Currently, it returns the DOM node of the section we want to 
> render, but we could instead return a new document with the <title> 
> node plus the DOM node we want to render (ditto for <link> nodes, 
> since we use those for things like 'eww-next-url').
>
> Since scoring the readability of the document requires iterating over 
> every DOM node, we could just collect the extra nodes we care about 
> (like <title>) while iterating. Then it'll be easy to include those 
> nodes in the readable form.
>
> Doing it this way should have the benefit that we don't start network 
> requests for images that won't be shown in the readable form of the page.

I had originally thought of trying to do it more-or-less likes this but 
it seemed like it would be a quite large change to code I wasn't that 
familiar with so I went with something more contained to get things 
working. It might take me a while, but I can give this approach a second 
more sustained try and see how it looks. The points about image loading 
and <link> elements are good ones. Solving those within the existing 
approach where we save even more information from the original 
"non-readable" rending of the page and possibly conditionally modify the 
renderer to avoid loading images if we're just going to switch to the 
"readable" rending automatically makes a somewhat messy situation even 
messier.





This bug report was last modified today.

Previous Next


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