GNU bug report logs -
#77299
eww-auto-rename-buffer 'title interaction with eww-readable-urls
Previous Next
Full log
Message #29 received at 77299 <at> debbugs.gnu.org (full text, mbox):
On 6/11/2025 12:30 PM, Eli Zaretskii wrote:
>> Date: Wed, 11 Jun 2025 10:11:03 -0700
>> Cc: 77299 <at> debbugs.gnu.org
>> From: Jim Porter <jporterbugs <at> gmail.com>
>>
>> On 6/9/2025 6:38 AM, Keith Amidon wrote:
>>> A quick update on this: I've been using the version of eww-display-html
>>> quoted below regularly since I last commented on the bug about a month
>>> ago and think it is working fine. If the approach seems acceptable, I'd
>>> be happy to prepare a patch to send to emacs-devel. --- Keith
>>
>> I think I'd prefer a solution that doesn't require a workaround like
>> this.
>
> What workaround are you alluding to?
Rendering the original document and immediately re-rendering the
"readable" form of the document.
>> If we could get a fix that resolves this issue without the
>> workaround, I think that would be best.
>
> Feel free to suggest a way if you see it. Both Keith and myself
> looked at the code and concluded that it would be impossible without
> completely rewriting this functionality. See
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77299#8
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.
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.