unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 40532@debbugs.gnu.org, Arnaud Fontaine <arnau@mini-dweeb.org>
Subject: bug#40532: 28.0.50; eww/shr: Anchor link does not work
Date: Tue, 19 May 2020 14:23:46 +0200	[thread overview]
Message-ID: <87k118ru3x.fsf@gnus.org> (raw)
In-Reply-To: <87h7wrkz9x.fsf@tcd.ie> (Basil L. Contovounesios's message of "Fri, 08 May 2020 02:10:02 +0100")

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> OTOH if the shr-target-id property is always attached to the relevant
> 'id' and (deprecated) 'name' attributes, then cached table contents will
> still be searchable.  This shouldn't be overkill in terms of performance
> because yet another text property on a subet of the DOM should be
> comparatively cheap, right?
>
> So WDYT of the following fix?  Can you think of any better solutions?

The patch is a bit hard to read, because it seems to have a lot of
unrelated changes like:

> -(require 'shr)
> -(require 'url)
> -(require 'url-queue)
> -(require 'thingatpt)
>  (require 'mm-url)
>  (require 'puny)
> -(eval-when-compile (require 'subr-x)) ;; for string-trim
> +(require 'shr)
> +(require 'text-property-search)
> +(require 'thingatpt)
> +(require 'url)
> +(require 'url-queue)
> +(eval-when-compile (require 'subr-x))

and

> -    (when (and shr-target-id
> -	       (equal (dom-attr dom 'name) shr-target-id))
> -      ;; We have a zero-length <a name="foo"> element, so just
> -      ;; insert...  something.
> +    (when-let* ((id (or (dom-attr dom 'id)
> +                        ;; Obsolete since HTML5.
> +                        (dom-attr dom 'name))))
> +      ;; We have an empty element, so just insert... something.

and

> -	    (insert "*"))
> -	  (put-text-property start (1+ start) 'shr-target-id shr-target-id))
> +            (insert ?*)
> +            (put-text-property (1- (point)) (point) 'display ""))
> +          (put-text-property start (1+ start) 'shr-target-id id))

so I can't really make out what the changes you're making in this area is...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2020-05-19 12:23 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
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 [this message]
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

  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=87k118ru3x.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=40532@debbugs.gnu.org \
    --cc=arnau@mini-dweeb.org \
    --cc=contovob@tcd.ie \
    /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).