emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eww and bookmarks


From: Alfred M. Szmidt
Subject: Re: eww and bookmarks
Date: Sun, 24 May 2020 10:14:02 -0400

I haven't followed the discussion closely, so might have missed things
-- the addition of bookmarks for URLs would be very nice.

Isn't this very easily done though, both so that it works for the case
of eww, but also (which I think is important, in the generic case),
simple untested hackery, in .emacs.bmk we have:

("The GNU Operating System and the Free Software Movement"
 (url . "http://www.gnu.org/";)
 (handler . browse-url-bookmark-jump))

Then browse-url-bookmark-jump is simply:

(defun browse-url-bookmark-jump (bmk)
  (let* ((url (bookmark-prop-get bmk 'url))
         (buf (save-window-excursion (browse-url url) (current-buffer))))
    (bookmark-default-handler
     `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bmk)))))

Those that like EWW would already be doing:

  (setq browse-url-browser-function 'eww-browse-url)

And then the equivalent browse-url-bookmark-make-record (e.g,
Info-Info-bookmark-make-record) function for setting, which is left as
a excersie for the reader -- or I can make a patch.  This might not
work of course if you are outside of the context of Emacs.

It would be strange if eww implemented its own bookmarking
functionality, when all of this is already simple to add.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]