unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Mike Kupfer <kupfer@rawbw.com>
Cc: 60423@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@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	[thread overview]
Message-ID: <86zfnbyywr.fsf@gnu.org> (raw)
In-Reply-To: <51018.1728603976@alto.camomileplus.org> (message from Mike Kupfer on Thu, 10 Oct 2024 16:46:16 -0700)

> From: Mike Kupfer <kupfer@rawbw.com>
> cc: Stefan Monnier <monnier@iro.umontreal.ca>, stefankangas@gmail.com,
>         60423@debbugs.gnu.org
> Comments: In-reply-to Eli Zaretskii <eliz@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@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.





  reply	other threads:[~2024-10-11  5:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30  3:59 bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Mike Kupfer
2022-12-30 14:52 ` Eli Zaretskii
2023-09-05 23:31   ` Stefan Kangas
2023-09-06  4:27     ` Mike Kupfer
2024-10-09  0:09     ` Mike Kupfer
2024-10-09 12:24       ` Eli Zaretskii
2024-10-10 23:46         ` Mike Kupfer
2024-10-11  5:46           ` Eli Zaretskii [this message]
2024-10-12 23:13         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=86zfnbyywr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60423@debbugs.gnu.org \
    --cc=kupfer@rawbw.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@gmail.com \
    /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).