all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-devel@gnu.org
Subject: Re: eww and bookmarks
Date: Mon, 26 Oct 2020 14:05:36 -0500	[thread overview]
Message-ID: <87mu08iz9b.fsf@alphapapa.net> (raw)
In-Reply-To: 87v9ewx1xs.fsf@gnus.org

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	other threads:[~2020-10-26 19:05 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 11:48 eww and bookmarks Matthias Meulien
2020-05-20 16:29 ` Drew Adams
2020-05-20 16:35   ` Noam Postavsky
2020-05-20 16:40     ` Drew Adams
2020-05-20 20:13     ` Matthias Meulien
2020-05-23 22:56       ` Michael Heerdegen
2020-05-24  8:44         ` Matthias Meulien
2020-05-24 14:14           ` Alfred M. Szmidt
2020-05-24 19:06             ` Karl Fogel
2020-05-25  4:35             ` Michael Heerdegen
2020-05-25  5:26               ` Alfred M. Szmidt
2020-05-26  2:17                 ` Michael Heerdegen
2020-06-10 15:39                   ` Lars Ingebrigtsen
2020-06-10 20:03                     ` Drew Adams
2020-05-25 12:51               ` Stefan Monnier
2020-05-25 13:52                 ` Marcin Borkowski
2020-05-25 15:03                 ` Alfred M. Szmidt
2020-05-25 15:24                   ` Stefan Monnier
2020-05-25 23:40                   ` Michael Heerdegen
     [not found]                 ` <e23432dd-212b-4bf0-8e8c-185988c653f0@default>
2020-05-26  1:04                   ` Michael Heerdegen
2020-05-27  5:10                     ` Drew Adams
2020-05-25  4:28           ` Michael Heerdegen
2020-05-25 14:35             ` T.V Raman
2020-05-20 22:14     ` Michael Heerdegen
2020-06-07 15:09       ` Michael Heerdegen
2020-06-07 15:30         ` Basil L. Contovounesios
2020-06-07 16:13           ` Michael Heerdegen
2020-06-07 16:36             ` Tomas Hlavaty
2020-06-07 18:23             ` Basil L. Contovounesios
2020-06-08 14:49               ` Michael Heerdegen
2020-06-08 16:54                 ` Basil L. Contovounesios
2020-06-10 12:01                   ` Michael Heerdegen
2020-06-07 16:36           ` Lars Ingebrigtsen
2020-06-07 18:23             ` Basil L. Contovounesios
2020-06-08 14:42           ` Michael Heerdegen
2020-06-08 16:58             ` Basil L. Contovounesios
2020-06-10 12:06               ` Michael Heerdegen
2020-10-26 18:15                 ` Adam Porter
2020-10-26 18:33                   ` Drew Adams
2020-10-26 18:43                   ` Lars Ingebrigtsen
2020-10-26 19:05                     ` Adam Porter [this message]
2020-10-26 19:26                   ` Karl Fogel
2020-06-07 16:31         ` Clément Pit-Claudel
  -- strict thread matches above, loose matches on Subject: below --
2020-05-27  7:18 Boruch Baum
2020-05-27 14:40 ` Drew Adams

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=87mu08iz9b.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-devel@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.