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: Mike Kupfer <kupfer <at> rawbw.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 60423 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together
Date: Tue, 08 Oct 2024 17:09:06 -0700
Stefan Kangas wrote:

> Mike, did you make any progress here?  Thanks in advance.

I finally have some progress to report.

The root cause of the fontification conflict between goto-address and
shr/textsec is that the textsec code uses text properties,
goto-address uses overlays, and overlays override text properties.

So one possible approach to fix this would be for the textsec code to
use overlays, and give the textsec overlay a higher priority than the
goto-address overlay.

I see a couple potential drawbacks with that approach:

1. shr originally used overlays; it was changed to use text properties
because of performance concerns (see
https://lists.gnu.org/r/emacs-diffs/2013-06/msg00215.html).  Of course,
that was over 10 years ago, and processors are faster now.  And maybe
shr could use overlays for the textsec stuff and text properties
everywhere else?

2. AFAICT, there's no system for coordinating overlay priorities across
different packages or subsystems.  I think that makes the priority
mechanism brittle, and for that reason I'm reluctant to use it.

So I lean towards having goto-address leave text alone (don't set an
overlay) if it finds text properties set for the text.

If you have any recommendations or other comments, please let me know.

thanks,
mike




This bug report was last modified 224 days ago.

Previous Next


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