all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: 19664@debbugs.gnu.org
Subject: bug#19664: 24.4: eww.el why bury history buffer?
Date: Fri, 23 Jan 2015 11:06:48 -0500	[thread overview]
Message-ID: <54C27198.1010705@gmx.com> (raw)

[-- 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 --]

             reply	other threads:[~2015-01-23 16:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 16:06 Boruch Baum [this message]
2015-01-25  2:52 ` bug#19664: 24.4: eww.el why bury history buffer? Lars Ingebrigtsen
2015-01-25  2:57 ` Lars Ingebrigtsen
2015-01-25  7:20   ` Boruch Baum
2015-01-26  1:53     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C27198.1010705@gmx.com \
    --to=boruch_baum@gmx.com \
    --cc=19664@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.