all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19664: 24.4: eww.el why bury history buffer?
@ 2015-01-23 16:06 Boruch Baum
  2015-01-25  2:52 ` Lars Ingebrigtsen
  2015-01-25  2:57 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Boruch Baum @ 2015-01-23 16:06 UTC (permalink / raw
  To: 19664

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-26  1:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 16:06 bug#19664: 24.4: eww.el why bury history buffer? Boruch Baum
2015-01-25  2:52 ` Lars Ingebrigtsen
2015-01-25  2:57 ` Lars Ingebrigtsen
2015-01-25  7:20   ` Boruch Baum
2015-01-26  1:53     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.