GNU bug report logs - #60423
29.0.60; goto-address and shr/textsec don't play nicely together

Previous Next

Package: emacs;

Reported by: Mike Kupfer <kupfer <at> rawbw.com>

Date: Fri, 30 Dec 2022 07:04:07 UTC

Severity: normal

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mike Kupfer <kupfer <at> rawbw.com>
Cc: 60423 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, stefankangas <at> gmail.com
Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together
Date: Fri, 11 Oct 2024 08:46:44 +0300
> From: Mike Kupfer <kupfer <at> rawbw.com>
> cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, stefankangas <at> gmail.com,
>         60423 <at> debbugs.gnu.org
> Comments: In-reply-to Eli Zaretskii <eliz <at> gnu.org>
>    message dated "Wed, 09 Oct 2024 15:24:02 +0300."
> Date: Thu, 10 Oct 2024 16:46:16 -0700
> 
> Eli Zaretskii wrote:
> 
> > > From: Mike Kupfer <kupfer <at> rawbw.com>
> [...]
> > > So I lean towards having goto-address leave text alone (don't set an
> > > overlay) if it finds text properties set for the text.
> > 
> > Not just any properties: only 'face' properties, right?
> 
> Hmm.  shr-tag-a sets these properties, with shr-urlify doing most of the
> work:
> 
> - face ('shr-link')
> - shr-url
> - button
> - category
> - help-echo
> - follow-link
> - mouse-face
> 
> If the URL is suspicious, shr-tag-a also inserts a triangular warning
> symbol with a 'help-echo' property.
> 
> So if I just care about conflicts between goto-address and shr, I guess
> I could just check for the 'shr-link' face.  I'd prefer to have a more
> general test, so I think I want to check for any of
> 
> - face
> - help-echo
> - mouse-face
> 
> and maybe
> 
> - button
> - follow-link
> 
> as well.  What do you think?

AFAIU from your analysis of the problem, it happens because the same
text is covered by both a text property and an overlay with the same
property.  If that is indeed the reason, then the only conflict that I
could see in this situation is for the 'face' property: both shr-tag-a
and goto-address use it, one as a text property and the other as an
overlay property.  The other properties you mention aren't used by
goto-address, so they cannot conflict with what shr-tag-a.  Am I
missing something?

Testing unrelated properties might give us false positives, so I think
we should avoid that.




This bug report was last modified 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.