GNU bug report logs -
#35445
26.2; eww-follow-link breaks on the second invocation
Previous Next
Reported by: Xu Chunyang <mail <at> xuchunyang.me>
Date: Sat, 27 Apr 2019 07:51:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.2
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I'm visiting https://docs.python.org/3/library/functions.html, I click
the #abs link with RET (`eww-follow-link`), it works as expected, i.e.,
don't request the same page again but simply jump to #abs. However, when
I click the same link again with RET, it will requests the page AGAIN,
then jump to #abs.
According to my observation, the eww-data's :url is missing after the
first eww-follow-link invocation. eww-follow-link contains these two lines of code
(eww-save-history)
(eww-display-html 'utf-8 url dom nil (current-buffer))
the first line clears eww-data via (setq eww-data (list :title "")), but
the second line forgets to (plist-put eww-data :url url).
The following patch fixes the issue for me:
diff -u --label /Users/xcy/src/emacs-mac/lisp/net/eww.el --label \#\<buffer\ eww.el\> /Users/xcy/src/emacs-mac/lisp/net/eww.el /var/folders/7f/s191h4q97p90374yw15ssrs00000gn/T/buffer-content-hznRFC
--- /Users/xcy/src/emacs-mac/lisp/net/eww.el
+++ #<buffer eww.el>
@@ -1495,6 +1495,7 @@
(eww-same-page-p url (plist-get eww-data :url)))
(let ((dom (plist-get eww-data :dom)))
(eww-save-history)
+ (plist-put eww-data :url url)
(eww-display-html 'utf-8 url dom nil (current-buffer))))
(t
(eww-browse-url url external)))))
Diff finished. Sat Apr 27 15:37:19 2019
This bug report was last modified 6 years and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.