unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Yuchen Pei <hi@ypei.me>, 50497@debbugs.gnu.org
Subject: bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path.
Date: Mon, 13 Sep 2021 20:51:39 +0300	[thread overview]
Message-ID: <87zgsgqsoc.fsf@mail.linkov.net> (raw)
In-Reply-To: <878s00j416.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 13 Sep 2021 10:03:33 +0200")

>>> That's also true, so I was sceptical about adding that (because it also
>>> makes `C-s' etc behave sub-optimally in 99.7% of web pages), so I've
>>> been pondering whether to remove it (or at least hide it behind and
>>> option defaulting to "off").
>>
>> But users like it:
>> https://www.reddit.com/r/emacs/comments/9oi1e3/ewws_awesome_isearch_support_just_blew_my_mind/
>
> Yeah, it's a neat trick (which makes people go "ooo").  So disabling it
> would be a shame.  But it does make the user experience slightly worse
> most of the time...
>
> Actually, we could just tweak it -- today it says "repeat for next
> buffer" even if there's no next buffer (it only checks afterwards),
> apparently.  Hm...  Right, if eww only sets
> `multi-isearch-next-buffer-function' when there's a rel=next/prev, then
> this awkwardness disappears.

But still I'd like to make `C-s' less sub-optimal when used
on pages with a rel=next/prev and to fix such complaints:

  "It turns out that this interacts badly with asynchronous loading of
  web pages -- I think the buffer is being searched before the web content
  is loaded, but with local content it's either all managing to happen
  fast enough that the issue doesn't arise, or it's being done in a more
  synchronous manner.  Hopefully this can be addressed, but in the
  meantime you may need to test with local html files."

What do you think about supporting synchronous mode in eww?
When adding a variable that causes eww-retrieve to use
url-retrieve-synchronously, isearch part could look like this:

  (defun eww-isearch-next-buffer (&optional _buffer wrap)
    (let ((eww-synchronous t))
      (if wrap
          (condition-case nil
              (eww-top-url)
            (error nil))
        (if isearch-forward
            (eww-next-url)
          (eww-previous-url))))
    (current-buffer))





  parent reply	other threads:[~2021-09-13 17:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  3:05 bug#50497: [PATCH] Adding eww-{next,previous,up,top}-path Yuchen Pei
2021-09-10  6:43 ` Juri Linkov
2021-09-10  6:57   ` Yuchen Pei
2021-09-10 11:28 ` Lars Ingebrigtsen
2021-09-10 12:50   ` Yuchen Pei
2021-09-11 12:22     ` Lars Ingebrigtsen
2021-11-06  0:29       ` Lars Ingebrigtsen
2021-09-10 16:10   ` Juri Linkov
2021-09-11 12:18     ` Lars Ingebrigtsen
2021-09-11 19:01       ` Juri Linkov
2021-09-13  8:03         ` Lars Ingebrigtsen
2021-09-13  8:25           ` Juri Linkov
2021-09-13 17:51           ` Juri Linkov [this message]
2021-09-14 11:04             ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zgsgqsoc.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=50497@debbugs.gnu.org \
    --cc=hi@ypei.me \
    --cc=larsi@gnus.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).