From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Arnaud Fontaine <arnau@mini-dweeb.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 40532@debbugs.gnu.org
Subject: bug#40532: 28.0.50; eww/shr: Anchor link does not work
Date: Wed, 22 Apr 2020 13:55:05 +0100 [thread overview]
Message-ID: <87imhr65p2.fsf@tcd.ie> (raw)
In-Reply-To: <87blnj92dy.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 22 Apr 2020 12:38:17 +0100")
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Indeed; I think it's a regression in Emacs 27 caused by the following
> fix for bug#28441:
>
> Make #anchors work again in eww
> fa41693799 2018-04-13 14:55:55 +0200
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fa416937997a113d84ab4e4910d730ce5d77613d
>
> Previously, eww-follow-link depended on eww-display-html to set
> shr-target-id, but following this change that's no longer the case.
>
> This doesn't affect eww-reload, which also calls eww-display-html,
> because it passes it an explicit position to jump to.
[...]
> Lars, Eli, how's the following fix for emacs-27?
Here's an even better fix for the regression IMO:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-eww-follow-link-on-URLs-with-target.patch --]
[-- Type: text/x-diff, Size: 1061 bytes --]
From 541a85fd17193a67883a36876fb982710abe4f7d Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Wed, 22 Apr 2020 11:42:17 +0100
Subject: [PATCH] Fix eww-follow-link on URLs with #target
* lisp/net/eww.el (eww-display-html): Ensure shr-target-id is set as
callers depend on this (bug#28441, bug#40532).
---
lisp/net/eww.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index c83884fd25..1be499172b 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -518,6 +518,10 @@ eww-display-html
(plist-put eww-data :dom document)
(let ((inhibit-read-only t)
(inhibit-modification-hooks t)
+ ;; Possibly set by the caller, e.g., `eww-render' which
+ ;; preserves the old URL #target before chasing redirects.
+ (shr-target-id (or shr-target-id
+ (url-target (url-generic-parse-url url))))
(shr-external-rendering-functions
(append
shr-external-rendering-functions
--
2.26.1
[-- Attachment #3: Type: text/plain, Size: 18 bytes --]
WDYT?
--
Basil
next prev parent reply other threads:[~2020-04-22 12:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 3:56 bug#40532: 28.0.50; eww/shr: Anchor link does not work Arnaud Fontaine
2020-04-22 6:24 ` Arnaud Fontaine
2020-04-22 11:38 ` Basil L. Contovounesios
2020-04-22 12:55 ` Basil L. Contovounesios [this message]
2020-04-25 14:46 ` Arnaud Fontaine
2020-04-25 20:28 ` Basil L. Contovounesios
2020-04-30 4:11 ` Lars Ingebrigtsen
2020-04-30 10:20 ` Basil L. Contovounesios
2020-05-08 1:10 ` Basil L. Contovounesios
2020-05-12 4:57 ` Arnaud Fontaine
2020-05-21 22:34 ` Basil L. Contovounesios
2020-05-19 12:23 ` Lars Ingebrigtsen
2020-05-21 22:34 ` Basil L. Contovounesios
2020-06-13 15:06 ` Basil L. Contovounesios
2020-06-18 15:54 ` Basil L. Contovounesios
2020-04-22 13:53 ` Eli Zaretskii
2020-04-22 15:44 ` Basil L. Contovounesios
2020-04-22 15:57 ` Eli Zaretskii
2020-04-22 16:15 ` Basil L. Contovounesios
2020-04-22 16:21 ` Eli Zaretskii
2020-04-22 22:32 ` Basil L. Contovounesios
2020-04-22 20:10 ` Arnaud Fontaine
2020-04-22 22:32 ` Basil L. Contovounesios
2020-04-25 10:14 ` Eli Zaretskii
2020-04-30 4:13 ` Lars Ingebrigtsen
2020-04-30 10:15 ` Basil L. Contovounesios
2020-04-30 22:09 ` Lars Ingebrigtsen
2020-05-03 23:49 ` Basil L. Contovounesios
2020-05-07 4:02 ` Arnaud Fontaine
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=87imhr65p2.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=40532@debbugs.gnu.org \
--cc=arnau@mini-dweeb.org \
--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 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.