Subject: bug#19640: additional information

From: Boruch Baum <[email-masked]>
Date: Tue, 20 Jan 2015 16:48:19 -0500

defun eww-restore-history seems to need to start with a variation of
eww-setup-buffer:

(defun eww-restore-history (elem)
  (if (get-buffer "*eww*")
    (switch-to-buffer "*eww*")
   (switch-to-buffer (get-buffer-create "*eww*"))
   (remove-overlays)
   (eww-mode)
;; MISSING:
;; restore/retain values of:
;;   eww-history-position
;;   eww-history
   (setq-local eww-next-url nil)
   (setq-local eww-previous-url nil)
   (setq-local eww-up-url nil)
   (setq-local eww-home-url nil)
   (setq-local eww-start-url nil)
   (setq-local eww-contents-url nil))
  (let ((inhibit-read-only t))
   (erase-buffer)
    (insert (plist-get elem :text))
    (setq eww-current-source (plist-get elem :source))
    (setq eww-current-dom (plist-get elem :dom))
    (goto-char (plist-get elem :point))
    (setq eww-current-url (plist-get elem :url)
          eww-current-title (plist-get elem :title))
    (eww-update-header-line-format)))

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0