diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d079103128..bc31f5d14bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,7 @@ to a single page, used throughout the file instead of the variables `eww-current-url', `eww-current-dom', `eww-current-source', and `eww-current-title'. + (eww-readable): Copy over pertinent data from the parent page. * net/eww.el: Remove `eww-next-url', `eww-previous-url', `eww-up-url', `eww-home-url', `eww-start-url' and diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 2ad3980e8d9..b697fa32f4b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -419,10 +419,10 @@ This command uses heuristics to find the parts of the web page that contains the main textual portion, leaving out navigation menus and the like." (interactive) - (let* ((source (plist-get eww-data :source)) + (let* ((old-data eww-data) (dom (shr-transform-dom (with-temp-buffer - (insert source) + (insert (plist-get old-data :source)) (condition-case nil (decode-coding-region (point-min) (point-max) 'utf-8) (coding-system-error nil)) @@ -432,7 +432,9 @@ the like." (eww-display-html nil nil (shr-retransform-dom (eww-highest-readability dom))) - (plist-put eww-data :source source))) + (dolist (elem '(:source :url :title :next :previous :up)) + (plist-put eww-data elem (plist-get old-data elem))) + (eww-update-header-line-format))) (defun eww-score-readability (node) (let ((score -1))