emacs-devel
[Top][All Lists]
Advanced

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

Re: eww and bookmarks


From: Michael Heerdegen
Subject: Re: eww and bookmarks
Date: Mon, 25 May 2020 06:35:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

address@hidden (Alfred M. Szmidt) writes:

> Isn't this very easily done though, both so that it works for the case

No one said it is hard ;-)  It's only left to decide how the handler
should behave.

> 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))

Is there really a generic case that creates bookmarks with an url field?

> 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)

Ok, so you would make the handler call `browse-url-browser-function',
and not eww unconditionally.  I think I would prefer that behavior, too.

> 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.

I already have one, but thanks for your input.

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

Just to be clear: this is where we are, eww has it's own bookmarking
mechanism, for a long time.

Michael.



reply via email to

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