From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86zfnbyywr.fsf@gnu.org> References: <175894.1672372745@alto> <831qoh6j0i.fsf@gnu.org> <69964.1728432546@alto.camomileplus.org> <86jzeh4g7x.fsf@gnu.org> <51018.1728603976@alto.camomileplus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17012"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60423@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com To: Mike Kupfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 11 07:48:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sz8Vg-0004DK-Tm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Oct 2024 07:48:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sz8VF-0001UV-Tp; Fri, 11 Oct 2024 01:47:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sz8VD-0001UH-AS for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2024 01:47:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sz8VC-0002KV-UI for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2024 01:47:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=/qtD5Q2hDhTMYQkOUxtB4fkjjajMsexFhXV0nGiIBAo=; b=tyGMUNmnY0PfyfhsKlFBaSCQYemo6Q47upVpVXctXwDltESFg0yL+fFW9xIKLl/J5UaBiIM+tyWMR7xy6uWlPZXST+/cMgtkgn0tRk+1DNcmy9+vkqCfu/LSIbYriFIp2MhgdXQwTD9jMeEOVfbdFT79PASB4lUzeyBLZM3Ry906ZnIm1SWnux6LJDNfSSIxKK3epo/W16Q5GQ5++7sJMhsrF2gHGJftJOGz+oI6U7U0LDvSnsTf8hXH09YeRZ04AtKv5a7VNAMO1hEfQ/DMVkrVCiMdTvVTmJJOkpQEH2wKxOO4iuKorfWXE+QmU7IggJ6YAk19XhfZdFint2ZLuQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sz8VO-00039Q-A7 for bug-gnu-emacs@gnu.org; Fri, 11 Oct 2024 01:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Oct 2024 05:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs Original-Received: via spool by 60423-submit@debbugs.gnu.org id=B60423.172862562712040 (code B ref 60423); Fri, 11 Oct 2024 05:48:02 +0000 Original-Received: (at 60423) by debbugs.gnu.org; 11 Oct 2024 05:47:07 +0000 Original-Received: from localhost ([127.0.0.1]:33139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sz8UV-000387-Ar for submit@debbugs.gnu.org; Fri, 11 Oct 2024 01:47:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sz8UT-00037X-V3 for 60423@debbugs.gnu.org; Fri, 11 Oct 2024 01:47:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sz8UA-0002Fa-VH; Fri, 11 Oct 2024 01:46:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/qtD5Q2hDhTMYQkOUxtB4fkjjajMsexFhXV0nGiIBAo=; b=nzqBA6Bp/AUj /D8Vk2bQFNERHUJOe+kdUlHSAP5CeCC1rSdD3vrYp3AOamuIfYFEFE1MIu5IuDuXDzs3JwkLDOkm3 h1AYwB3301P2fLVYspiL6spcUMiTVyJy4kkwJpWo0jUahvbOaRZB/FjeIMeo02BsDWiLWF9HXnr6r IwgCA7vqtiQbxPzshDevhbqvnn//3XIdtp7793NpYVMJKPuA312U6rn+nXYZ4qwueKdAbvBxpg55L 7GoG/t2fRGOJX+yRtaZDd/6gPp2kPzFjY96pHCOeDTfe2O0cEj78l/iugBY1QsMDMljEqvOi5AQsI 0jDlT3pnNm6CTFSXPr4AZQ==; In-Reply-To: <51018.1728603976@alto.camomileplus.org> (message from Mike Kupfer on Thu, 10 Oct 2024 16:46:16 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293329 Archived-At: > From: Mike Kupfer > cc: Stefan Monnier , stefankangas@gmail.com, > 60423@debbugs.gnu.org > Comments: In-reply-to Eli Zaretskii > 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 > [...] > > > 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.