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: 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: Mon, 9 Jun 2025 06:38:53 -0700
[Message part 1 (text/plain, inline)]
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

On 5/13/25 07:27, Keith Amidon wrote:
> Sorry it took so long for me to get back to looking into this more
> and thus for the long quote above to re-establish context. I have
> found that I seem to be able to get eww-auto-rename-buffer 'title,
> history titles, and org link capture to work with default readable
> URLs in eww-readable-urls by redefining eww-display-html to:
> (defun eww-display-html (charset url &optional document point buffer)
>    (let ((source (buffer-substring (point) (point-max))))
>      (with-current-buffer buffer
>        (plist-put eww-data :source source)))
>    (eww-display-document
>     (or document
>         (eww-document-base url (eww--parse-html-region (point) (point-max) charset)))
>     point buffer)
>    (and (null document)
>         (eww-default-readable-p url)
>         (with-current-buffer buffer
>           (eww-readable 1))))
> This is somewhat less efficient than the prior implementation in that
> the document gets displayed twice for default readable URLs, but it is
> no worse than not having default readability and manually toggling
> readability after the page is rendered.
>
> I haven't noticed any downsides to this redefinition yet, but I've
> only been playing around with it for a morning so far. Given it
> reduces the conflict between eww-readable-urls and multiple other
> features, it seems worth considering.
>
> --- Keith
>
[Message part 2 (text/html, inline)]

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.