From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#58118: 29.0.50; Follow #target links in eww without re-rendering page Date: Tue, 27 Sep 2022 18:23:52 +0200 Message-ID: <87v8p823c7.fsf@gnus.org> References: <87leq4rfno.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36606"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 58118@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 27 19:24:24 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odEJj-0009Hi-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Sep 2022 19:24:23 +0200 Original-Received: from localhost ([::1]:46628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odEJi-0007WL-E0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Sep 2022 13:24:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odDOJ-0002tI-3N for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 12:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odDOI-0005yL-Rw for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 12:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odDOI-0003wC-KL for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 12:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Sep 2022 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58118 X-GNU-PR-Package: emacs Original-Received: via spool by 58118-submit@debbugs.gnu.org id=B58118.166429584515064 (code B ref 58118); Tue, 27 Sep 2022 16:25:02 +0000 Original-Received: (at 58118) by debbugs.gnu.org; 27 Sep 2022 16:24:05 +0000 Original-Received: from localhost ([127.0.0.1]:56627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odDNN-0003ut-6R for submit@debbugs.gnu.org; Tue, 27 Sep 2022 12:24:05 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:54396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odDNJ-0003uL-AD for 58118@debbugs.gnu.org; Tue, 27 Sep 2022 12:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pwAHGaat+7gKBcrSFEPkkK03pGQcHPic4uN4VkRruJQ=; b=k7sIUMpgILHu4ZH0RhW7ezM2sO tAbgP9d8kRYU8VRbgjPNjQ/6NBj9BkBX4PhSa3w73F3HQbOIXIIth1n95Rq7rGn7R2jLcuev7RBkG /1WZ2RyzJpkuqWab7+VguD+e0/gMfbt+Fty2dNZs7bN+/7njzk/VsZS1qCypaHjhQvKw=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odDNA-0003YV-Pk; Tue, 27 Sep 2022 18:23:54 +0200 In-Reply-To: <87leq4rfno.fsf@gmail.com> (Visuwesh's message of "Tue, 27 Sep 2022 21:08:35 +0530") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEWRcmFMSE4qHB5X LCP///9RTAUoAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YJGxAOO7VvhwoAAAFNSURBVDjLlZNRtsMg CESt2UC1G4iwAQv739sbRE1s8k5P+dCaG2aAmvBIz9TikcID2zNYpBQiJVpDVbCGWEpO+QSZNhYD 2XTy6Tm/qBhIeQXpjbMBw2swNQ8zX5k6SGXxHuHmzYJVVK0gnhkdkAqLTCks4p6MUkXw2Ptg1uhA oIXFNA3UunkGwQLj0OYGELTKGJJZqKWomgePxnCulqEO0uwCOlW55ar1kcvROW/q0aebaBeBlHCd oE094VUTEKo8gAkUtG4ZKPxJfAJNnAUG9PKiDlAiGvRWV0Cm1q6Bax1gzPIeFBpad+CSAcI35vYm ZaZ6AWx/w47priD4vdnjZ+e1p11AOQq4AWpAL1X1jN+A/AB4CMkKuO+7+jXhCWTMK2Iy0m/7GUhs DcoE/S5y3fS9VtU+F9xR95gZ+D12F/0KuJ/HTh+dj+IA/os/Cl2at+vNgCYAAAAldEVYdGRhdGU6 Y3JlYXRlADIwMjItMDktMjdUMTY6MTQ6NTkrMDA6MDD9vVC7AAAAJXRFWHRkYXRlOm1vZGlmeQAy MDIyLTA5LTI3VDE2OjE0OjU5KzAwOjAwjODoBwAAAABJRU5ErkJggg== X-Now-Playing: Peter, Paul and Mary's _Peter, Paul and Mary_: "Sorrow" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243752 Archived-At: 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.) > 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)))