From: Lars Ingebrigtsen <larsi@gnus.org>
To: Visuwesh <visuweshm@gmail.com>
Cc: 58118@debbugs.gnu.org
Subject: bug#58118: 29.0.50; Follow #target links in eww without re-rendering page
Date: Tue, 27 Sep 2022 18:23:52 +0200 [thread overview]
Message-ID: <87v8p823c7.fsf@gnus.org> (raw)
In-Reply-To: <87leq4rfno.fsf@gmail.com> (Visuwesh's message of "Tue, 27 Sep 2022 21:08:35 +0530")
Visuwesh <visuweshm@gmail.com> writes:
> eww-follow-link currently follows #target links in the same URL by
> re-rendering the page. Whilst this is fine for small HTML files, the
> 1.9M HTML file that I'm currently visiting takes a couple seconds to
> render.
That's a regression, I think -- following #target links used to work
without re-rendering. (At least it did at one point.)
> I see that eww-display-html follows #target links by a text property
> search, why don't we do the same in eww-follow-link as well? I have one
> question though: what do we about non-existent #targets? Chrome and
> Firefox seem to not scroll when I add a non-existent #target to the
> current URL and say RET, and it seems to specially handle #top to mean
> to go to the top even if the HTML has no hits for "#top". Should we
> handle the special #top target?
Sure, makes sense.
> + (setq match (text-property-search-forward 'shr-target-id target #'member))
> + (if match
> + (goto-char (prop-match-beginning match))
This is more conveniently expressed as
(when-let ((text-property-search-forward 'shr-target-id target #'member))
(goto-char (prop-match-beginning match)))
next prev parent reply other threads:[~2022-09-27 16:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 15:38 bug#58118: 29.0.50; Follow #target links in eww without re-rendering page Visuwesh
2022-09-27 16:23 ` Lars Ingebrigtsen [this message]
2022-09-28 2:42 ` Visuwesh
2022-09-28 10:59 ` Lars Ingebrigtsen
2022-11-11 13:28 ` Stefan Kangas
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=87v8p823c7.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=58118@debbugs.gnu.org \
--cc=visuweshm@gmail.com \
/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).