bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40532: 28.0.50; eww/shr: Anchor link does not work


From: Basil L. Contovounesios
Subject: bug#40532: 28.0.50; eww/shr: Anchor link does not work
Date: Sat, 25 Apr 2020 21:28:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Arnaud Fontaine <arnau@mini-dweeb.org> writes:

>> Here's an even better fix for the regression IMO:
>>
>> 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
>
> While wikipedia  works fine  with your  patch, I  have noticed  that the
> following does not work though:
>   0. emacs -Q
>   1. M-x eww RET https://distrowatch.com/weekly.php?issue=20200413 RET
>   2. C-s HoleOS RET (place point on ToC entry "New distributions: HoleOS")
>   3. RET (eww-follow link)
>
> This goes to the top of the page.

Indeed, I've noticed this issue before, but it's a separate issue to the
regression we've been discussing so far.

Here's a more easily reproducible recipe if you build Emacs from its
source repository (if I visit the given distrowatch site using Emacs 25
or 26 for some reason HoleOS is not mentioned):

0. ./src/emacs -Q
1. M-x eww-open-file RET admin/unidata/copyright.html RET
2. C-s misc RET RET

This jumps to point-min rather than the Miscellaneous heading, and is
reproducible since at least Emacs 25.

The problem is with relative targets: for some reason shr-target-id is
not set appropriately when shr is rendering the page, so no
shr-target-id text property gets set, and eww can't subsequently find
anywhere to jump to.

Perhaps shr should unconditionally (without requiring shr-target-id to
be bound) mark all possible targets with text properties during
rendering.  I'll see if I can get this or any other way working today or
tomorrow, but either way this won't be fixed in Emacs 27.

Thanks,

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]