[செவ்வாய் செப்டம்பர் 27, 2022] Lars Ingebrigtsen wrote: > Visuwesh 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.) That's what I seem to remember as well. >> 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. Now done. >> + (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))) Thanks. Revised patch attached,