Subject: 24.4: eww.el why bury history buffer?

From: Boruch Baum <[email-masked]>
Date: Fri, 23 Jan 2015 11:06:48 -0500

Function eww-history-browse buries the eww-history buffer. That's
undesirable. The following seems to work for me.

(defun eww-history-browse ()
; improper use of 'when'. replaced with 'if (not' so that upo\
n error, the remainder of the function is not performed
; no need to quit window and bury buffer. undesirable, in fac\
t
; do need to get position in history
  "Browse the history under point in eww."
  (interactive)
  (if (not (equal (buffer-name) "*eww history*"))
    (user-error "Current buffer is not the eww history buffer\
")
   (setq element (get-text-property (line-beginning-position)\
 'eww-history)
         position (1- (line-number-at-pos))
         history eww-history)
   (if (not element)
     (user-error "No history on the current line")
    (if (get-buffer "*eww*")
      (set-buffer "*eww*")
     (set-buffer (get-buffer-create "*eww*"))
     (remove-overlays)
     (eww-mode))
    (setq eww-history-position position
          eww-history history)
    (eww-restore-history element))))

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