emacs-devel
[Top][All Lists]
Advanced

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

Re: eww and bookmarks


From: Adam Porter
Subject: Re: eww and bookmarks
Date: Mon, 26 Oct 2020 14:05:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Adam Porter <adam@alphapapa.net> writes:
>
>> Having recently put together a new package that uses bookmarks to
>> restore windows and buffers, Burly[0], I tested bookmarks with EWW
>> buffers, expecting them to be bookmarkable with Emacs bookmarks, but I
>> found that they aren't.  Then I found this thread[1] from June about
>> Michael's patch, which sounds great, but it doesn't seem to have been
>> applied yet.
>
> It sounded like a good idea to me, but looking at the thread, there were
> some problems with an async callback?  I've just skimmed it.  But I'm
> for using the normal Emacs bookmark regime in eww, if possible.

AIUI the issue is with restoring the position within a restored EWW
buffer.  That's certainly desirable, but IMHO it needn't prevent the
patch from being merged; not all major modes even have bookmark support,
and not all bookmark handlers always restore the buffer position
correctly, anyway (e.g. if the file has changed sufficiently since being
bookmarked).

As for fixing that issue, I have two thoughts:

1.  In Burly I faced a similar problem.  I used a solution similar to
one mentioned in the thread: I added a self-removing function to a hook
that's run after the bookmark is loaded.  In the thread, that solution
was not exactly rejected[0]; I think it's probably a good-enough
solution, especially by adding to the hook buffer-locally and wrapping
the hook-removal in an unwind-protect.

2. An alternative mentioned in the thread[1] was to use url-retrieve's
callback to move point after the buffer is rendered.  If there are any
problems with that solution, it doesn't seem that any were mentioned.

0: https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00338.html
1: https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00363.html




reply via email to

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