GNU bug report logs - #35445
26.2; eww-follow-link breaks on the second invocation

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35445 in the body.
You can then email your comments to 35445 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35445; Package emacs. (Sat, 27 Apr 2019 07:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xu Chunyang <mail <at> xuchunyang.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 27 Apr 2019 07:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Xu Chunyang <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; eww-follow-link breaks on the second invocation
Date: Sat, 27 Apr 2019 15:38:30 +0800
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35445; Package emacs. (Sun, 12 May 2019 20:37:02 GMT) Full text and rfc822 format available.

Message #8 received at 35445 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Xu Chunyang <mail <at> xuchunyang.me>
Cc: 35445 <at> debbugs.gnu.org
Subject: Re: bug#35445: 26.2; eww-follow-link breaks on the second invocation
Date: Sun, 12 May 2019 16:36:29 -0400
Xu Chunyang <mail <at> xuchunyang.me> writes:

> 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:

Thanks; I've applied the patch to the Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug Marked as fixed in versions 27.1. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 12 May 2019 20:37:04 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 12 May 2019 20:37:04 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 35445 <at> debbugs.gnu.org and Xu Chunyang <mail <at> xuchunyang.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 12 May 2019 20:37:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Jun 2019 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 315 days ago.

Previous Next


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