X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 30 Dec 2022 07:04:07 +0000 Resent-Message-ID: <handler.60423.B.167238382223814 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 60423 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.167238382223814 (code B ref -1); Fri, 30 Dec 2022 07:04:07 +0000 Received: (at submit) by debbugs.gnu.org; 30 Dec 2022 07:03:42 +0000 Received: from localhost ([127.0.0.1]:33445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pB9Qb-0006Bw-Or for submit <at> debbugs.gnu.org; Fri, 30 Dec 2022 02:03:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:59390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1pB6YE-0001KV-37 for submit <at> debbugs.gnu.org; Thu, 29 Dec 2022 22:59:22 -0500 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 <kupfer@HIDDEN>) id 1pB6YD-0001EB-Tn for bug-gnu-emacs@HIDDEN; Thu, 29 Dec 2022 22:59:21 -0500 Received: from shell1.rawbw.com ([198.144.192.42]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <kupfer@HIDDEN>) id 1pB6YB-0007Le-Ma for bug-gnu-emacs@HIDDEN; Thu, 29 Dec 2022 22:59:21 -0500 Received: from alto (135-180-174-133.dsl.dynamic.sonic.net [135.180.174.133] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 2BU3x5Fd017250 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <bug-gnu-emacs@HIDDEN>; Thu, 29 Dec 2022 19:59:10 -0800 (PST) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-174-133.dsl.dynamic.sonic.net [135.180.174.133] (may be forged) claimed to be alto From: Mike Kupfer <kupfer@HIDDEN> X-Mailer: MH-E 8.6+git; nmh 1.7.1; Emacs 29.0.60 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Thu, 29 Dec 2022 19:59:05 -0800 Message-ID: <175894.1672372745@alto> Received-SPF: pass client-ip=198.144.192.42; envelope-from=kupfer@HIDDEN; helo=shell1.rawbw.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, PDS_SHORT_SPOOFED_URL=1.997, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.8 (/) X-Mailman-Approved-At: Fri, 30 Dec 2022 02:03:35 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.2 (--) --=-=-= Content-Type: text/plain View the HTML portion of the attached email in MH-E and Gnus. Both will display "https://fsf.org" in red and put a caution emoji after it, because the link doesn't actually point to https://fsf.org. Good so far. In Gnus, if you mouse over the link, the actual target appears in the echo area. And if you mouse over the caution emoji, you'll see text in the echo area that tells you that the link target doesn't match the link text. Also good so far. In MH-E, if you mouse over the link or emoji, you get text in the echo area that tells you how to follow the link. There's no explanation given for the red text or the caution emoji, which is a bug IMO. I tracked this down to MH-E's use of goto-address when displaying a message (mh-display-msg > mh-show-addr > goto-address). I can think of a couple ways to deal with this, but I'm not sure what the right way forward is. The simplest approach would be for mh-display-msg to stop using goto-address. I'm not happy with that approach because it removes functionality that MH-E has had for awhile. A slightly more sophisticated approach would be to not use goto-address when using shr to render the message. That loses some functionality (like the auto-linkification of email addresses), and it seems kind of kludgey, but I suppose it's not too terrible. Another possibility would be to make goto-address smarter, so that it doesn't stomp on whatever it was that shr did to get the mouse-over text. I'm happy to take a stab at a fix, but I could use some guidance on the right direction to go in. thanks, mike --=-=-= Content-Type: text/html Content-Disposition: attachment; filename=5 Content-Description: test case email Subject: test case From: nobody@HIDDEN To: J. Random User <jru@HIDDEN> Date: Mon, 20 Jun 2022 21:40:46 +0000 Content-Type: multipart/alternative; boundary="_----------=_MCPart_63361485" MIME-Version: 1.0 This is a multi-part message in MIME format --_----------=_MCPart_63361485 Content-Type: text/plain; charset="utf-8"; format="fixed" [23oct22: deleted -mdk] --_----------=_MCPart_63361485 Content-Type: text/html; charset="utf-8" <!doctype html> <html> <head> </head> <body> <p>This <a href="https://fsf.org">link</a> is okay, as is <a href="https://fsf.org">https://fsf.org</a>.</p> <p>But this one is not: <a href="https://microsoft.com">https://fsf.org</a>.</p> <p><tt>goto-address</tt> will linkify foo@HIDDEN, but shr does not.</p> </body> </html> --_----------=_MCPart_63361485-- --=-=-= Content-Type: text/plain PS. I've reproduced the problem with commit a14821d615; you can ignore the "Repository revision" and "Repository branch" fields below. In GNU Emacs 29.0.60 (build 4, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2022-12-29 built on alto Repository revision: f26689637923ac9b834a209e1bab09c779be212f Repository branch: emacs-29-mdk Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --prefix=/usr/new' Configured features: CAIRO FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_TIME: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: MH-Folder Minor modes in effect: hl-line-mode: t shell-dirtrack-mode: t delete-selection-mode: t global-eldoc-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t column-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow mh-identity mh-letter emacsbug sort gnus-async gnus-bcklg gnus-kill qp cl-extra help-mode gnus-ml disp-table url-http url-gw url-cache url-auth url-handlers nnrss mm-url nndoc nndraft network-stream nsm gnus-agent gnus-srvr nnvirtual nntp gnus-cache textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check mm-archive mail-extr mh-mime mule-util mh-thread mh-show goto-addr gnus-cite mh-inc hl-line mh-tool-bar mh-acros mh-seq mh-xface mh-utils mh-folder which-func imenu misearch multi-isearch crm thingatpt cus-edit pp cus-start cus-load mdk-mail gnus-mh gnus-msg mh-comp mh-scan mh-gnus gnus-dup nnmh gnus-score score-mode gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs json map gv url-vars gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader range wid-edit mh-e mh-buffers mh-loaddefs message sendmail mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader warnings server noutline outline icons cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs byte-opt bytecomp byte-compile shell subr-x pcomplete comint ansi-osc ansi-color ring xcscope advice delsel vc vc-dispatcher timeclock cl-loaddefs cl-lib mdk-hacks rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads inotify dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 350237 71147) (symbols 48 23107 9) (strings 32 88955 27698) (string-bytes 1 2387295) (vectors 16 66600) (vector-slots 8 1547532 240746) (floats 8 253 414) (intervals 56 767 0) (buffers 976 22)) --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Mike Kupfer <kupfer@HIDDEN> Subject: bug#60423: Acknowledgement (29.0.60; goto-address and shr/textsec don't play nicely together) Message-ID: <handler.60423.B.167238382223814.ack <at> debbugs.gnu.org> References: <175894.1672372745@alto> X-Gnu-PR-Message: ack 60423 X-Gnu-PR-Package: emacs Reply-To: 60423 <at> debbugs.gnu.org Date: Fri, 30 Dec 2022 07:04:07 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 60423 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 60423: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60423 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 30 Dec 2022 14:53:02 +0000 Resent-Message-ID: <handler.60423.B60423.167241197525942 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mike Kupfer <kupfer@HIDDEN> Cc: 60423 <at> debbugs.gnu.org Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.167241197525942 (code B ref 60423); Fri, 30 Dec 2022 14:53:02 +0000 Received: (at 60423) by debbugs.gnu.org; 30 Dec 2022 14:52:55 +0000 Received: from localhost ([127.0.0.1]:33822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBGkh-0006kL-Ej for submit <at> debbugs.gnu.org; Fri, 30 Dec 2022 09:52:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pBGkf-0006k8-Md for 60423 <at> debbugs.gnu.org; Fri, 30 Dec 2022 09:52:54 -0500 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 <eliz@HIDDEN>) id 1pBGkZ-0007Yg-Vj; Fri, 30 Dec 2022 09:52:47 -0500 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=kx1EOTvl1A6aH+0j0RdET7Cfwg9ayEpJJghhr6LjHp0=; b=Oc4fsJ+8bxSW WL/CEAyCL+j0yOhC/F01FnmLlG+RwCEROQcu2yKPQhsmCpuyBfoADw1Q55E8vgWmI3V9MMOJfPxLc bIT8udw6f+4uxvzrXPflnQiemiBIsZBKPGdv0YxLbYRenBaL6djzUIQkWpU47i8FJNfzplLo394fk g2oBMK+8NDWhwrGI2J1XDxrDRNywlaK9K1evrbnPV2tM2fmN0He0ynxNT5V+EotRTrWWc2RkRW8NT s67jcurCbq0Md9EFOv3QEc6XDil0Xu3XiwUjGU0goGOtUM/uw5agP/sKWjZ+ecGgOe68lX29OXocP hLvf98sKKHB8rZONSsOyNA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pBGkX-00013Q-QS; Fri, 30 Dec 2022 09:52:47 -0500 Date: Fri, 30 Dec 2022 16:52:45 +0200 Message-Id: <831qoh6j0i.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <175894.1672372745@alto> (message from Mike Kupfer on Thu, 29 Dec 2022 19:59:05 -0800) References: <175894.1672372745@alto> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Mike Kupfer <kupfer@HIDDEN> > Date: Thu, 29 Dec 2022 19:59:05 -0800 > > In MH-E, if you mouse over the link or emoji, you get text in the echo > area that tells you how to follow the link. There's no explanation > given for the red text or the caution emoji, which is a bug IMO. > > I tracked this down to MH-E's use of goto-address when displaying a > message (mh-display-msg > mh-show-addr > goto-address). > > I can think of a couple ways to deal with this, but I'm not sure what > the right way forward is. The simplest approach would be for > mh-display-msg to stop using goto-address. I'm not happy with that > approach because it removes functionality that MH-E has had for awhile. > > A slightly more sophisticated approach would be to not use goto-address > when using shr to render the message. That loses some functionality > (like the auto-linkification of email addresses), and it seems kind of > kludgey, but I suppose it's not too terrible. > > Another possibility would be to make goto-address smarter, so that it > doesn't stomp on whatever it was that shr did to get the mouse-over > text. > > I'm happy to take a stab at a fix, but I could use some guidance on the > right direction to go in. I guess the latter, but it will have to be on master, since I'm quite sure the changes will not be safe enough for the release branch. Thanks.
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Stefan Kangas <stefankangas@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 05 Sep 2023 23:32:02 +0000 Resent-Message-ID: <handler.60423.B60423.16939566898428 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, Mike Kupfer <kupfer@HIDDEN> Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.16939566898428 (code B ref 60423); Tue, 05 Sep 2023 23:32:02 +0000 Received: (at 60423) by debbugs.gnu.org; 5 Sep 2023 23:31:29 +0000 Received: from localhost ([127.0.0.1]:59804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdfW4-0002Br-Jy for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 19:31:28 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:53512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1qdfW1-0002BZ-Ow for 60423 <at> debbugs.gnu.org; Tue, 05 Sep 2023 19:31:26 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50091b91a83so5095824e87.3 for <60423 <at> debbugs.gnu.org>; Tue, 05 Sep 2023 16:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693956679; x=1694561479; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=LSf2cd2obqnbiVKQssO3BGq+Q88zP/2Sw3T4szsGXp4=; b=b8uYCTIjT/uV4As46+1vkWyOKV56idnjZ4pwRshfsG/s3/mjEfQThSJ6hXP1oMXNqj 0RWXwov7dFDF9w69QPw4V9xzv80q5R4DZX0qAVgaiBHxJGNQzL6A+ZPKmukwchmZEUB0 w2pbIOrsOJrjMf6J+GiexiET7+wZARK4bEKMkGxML4nmnz8WdLLF5BtAgg64U+q1u0zO b3U/mHb3GXFXRa5R8/lICvxpqRt8FCvGZBIaoGb9tQE7BIi4JWHbumK7lyhx96twDbl5 4syks4vlk/Ig6DDCy1oifYqXEMHKey/KmBmbxFh/E0Xt6BXNZMT7X2TEU9phvDzymKGD T5Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693956679; x=1694561479; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LSf2cd2obqnbiVKQssO3BGq+Q88zP/2Sw3T4szsGXp4=; b=ieEL1cbA/YdDbD/bZaarXpDyeEGtJKDvF0yfl5zh2JR/yzG370EHv3iEIB+4p+24GP t+LP+H8h7fl7S7Wi8B3Yunehn4vB4UnI/JhIzb2z9dfFYQQfIWuQuxqlQAAoB23mdFJH ThG7M2nHIK0DvZ5PRsE/1Ts9tef1M2vaLCvfx9uRHC2Wewl0Z7tohDqaeIAJaKt75cgg 9RG8pN6SxY4rtQjSv+2/GEr4qev9BySWnTrLdm5Cb/01G3hdrhSw0LpiUZDZbZzDMYbJ L7MGJAg80k3k6ud03GYQo3RRalHTRMZo9jys6XZnrRDHV1tJYrgufkQrW6eKkatsUvbv TcjA== X-Gm-Message-State: AOJu0YxVetr2kN8vI3tCqXyXFJd8Rs76O+lTLZEkBfTJzS9bDz6IhBUV zkujTXipVVwBVcrjh7EcPwUBvoUBiVgtytf/Y4U= X-Google-Smtp-Source: AGHT+IG5KF0cUlFS+0TMyICAN9YFQJMWXbjxsGVjdRr9M2+z87F2WV6jKjZryyvBUXjp1N4U5Iq/xu1THYx9npS38kM= X-Received: by 2002:a19:e00e:0:b0:500:79a6:38d4 with SMTP id x14-20020a19e00e000000b0050079a638d4mr854254lfg.40.1693956679110; Tue, 05 Sep 2023 16:31:19 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Sep 2023 16:31:18 -0700 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <831qoh6j0i.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 30 Dec 2022 16:52:45 +0200") References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> MIME-Version: 1.0 Date: Tue, 5 Sep 2023 16:31:18 -0700 Message-ID: <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii <eliz@HIDDEN> writes: >> From: Mike Kupfer <kupfer@HIDDEN> >> Date: Thu, 29 Dec 2022 19:59:05 -0800 >> >> In MH-E, if you mouse over the link or emoji, you get text in the echo >> area that tells you how to follow the link. There's no explanation >> given for the red text or the caution emoji, which is a bug IMO. >> >> I tracked this down to MH-E's use of goto-address when displaying a >> message (mh-display-msg > mh-show-addr > goto-address). >> >> I can think of a couple ways to deal with this, but I'm not sure what >> the right way forward is. The simplest approach would be for >> mh-display-msg to stop using goto-address. I'm not happy with that >> approach because it removes functionality that MH-E has had for awhile. >> >> A slightly more sophisticated approach would be to not use goto-address >> when using shr to render the message. That loses some functionality >> (like the auto-linkification of email addresses), and it seems kind of >> kludgey, but I suppose it's not too terrible. >> >> Another possibility would be to make goto-address smarter, so that it >> doesn't stomp on whatever it was that shr did to get the mouse-over >> text. >> >> I'm happy to take a stab at a fix, but I could use some guidance on the >> right direction to go in. > > I guess the latter, but it will have to be on master, since I'm quite > sure the changes will not be safe enough for the release branch. > > Thanks. Mike, did you make any progress here? Thanks in advance.
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together References: <175894.1672372745@alto> Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 06 Sep 2023 04:28:02 +0000 Resent-Message-ID: <handler.60423.B60423.16939744364960 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas <stefankangas@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN> Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.16939744364960 (code B ref 60423); Wed, 06 Sep 2023 04:28:02 +0000 Received: (at 60423) by debbugs.gnu.org; 6 Sep 2023 04:27:16 +0000 Received: from localhost ([127.0.0.1]:60499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdk8J-0001Hw-Vf for submit <at> debbugs.gnu.org; Wed, 06 Sep 2023 00:27:16 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:20367 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1qdk8E-0001Hj-8t for 60423 <at> debbugs.gnu.org; Wed, 06 Sep 2023 00:27:14 -0400 Received: from alto (135-180-173-181.dsl.dynamic.sonic.net [135.180.173.181] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 3864R04d002817 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Sep 2023 21:27:07 -0700 (PDT) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-173-181.dsl.dynamic.sonic.net [135.180.173.181] (may be forged) claimed to be alto From: Mike Kupfer <kupfer@HIDDEN> In-Reply-To: Your message of "Tue, 05 Sep 2023 16:31:18 -0700." <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> X-Mailer: MH-E 8.6+git; nmh 1.7.1; Emacs 29.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7876.1693974420.1@alto> Date: Tue, 05 Sep 2023 21:27:00 -0700 Message-ID: <7877.1693974420@alto> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Stefan Kangas wrote: > Mike, did you make any progress here? Thanks in advance. No, I'm afraid I haven't had time to look into this. mike
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 09 Oct 2024 00:10:02 +0000 Resent-Message-ID: <handler.60423.B60423.172843256729923 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas <stefankangas@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN> Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.172843256729923 (code B ref 60423); Wed, 09 Oct 2024 00:10:02 +0000 Received: (at 60423) by debbugs.gnu.org; 9 Oct 2024 00:09:27 +0000 Received: from localhost ([127.0.0.1]:54910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1syKGc-0007mZ-Pf for submit <at> debbugs.gnu.org; Tue, 08 Oct 2024 20:09:27 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:21398 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1syKGZ-0007mM-T8 for 60423 <at> debbugs.gnu.org; Tue, 08 Oct 2024 20:09:25 -0400 Received: from alto.camomileplus.org (135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 4990966k045808 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 8 Oct 2024 17:09:11 -0700 (PDT) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged) claimed to be alto.camomileplus.org From: Mike Kupfer <kupfer@HIDDEN> In-reply-to: <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> Comments: In-reply-to Stefan Kangas <stefankangas@HIDDEN> message dated "Tue, 05 Sep 2023 16:31:18 -0700." X-Mailer: MH-E 8.6+git; nmh 1.8-RC2; Emacs 30.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <69963.1728432546.1@HIDDEN> Date: Tue, 08 Oct 2024 17:09:06 -0700 Message-ID: <69964.1728432546@HIDDEN> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 09 Oct 2024 12:25:02 +0000 Resent-Message-ID: <handler.60423.B60423.172847667115732 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mike Kupfer <kupfer@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.172847667115732 (code B ref 60423); Wed, 09 Oct 2024 12:25:02 +0000 Received: (at 60423) by debbugs.gnu.org; 9 Oct 2024 12:24:31 +0000 Received: from localhost ([127.0.0.1]:55909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1syVjy-00045g-UO for submit <at> debbugs.gnu.org; Wed, 09 Oct 2024 08:24:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1syVjx-00045S-F6 for 60423 <at> debbugs.gnu.org; Wed, 09 Oct 2024 08:24:30 -0400 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 <eliz@HIDDEN>) id 1syVjg-0003Si-Ac; Wed, 09 Oct 2024 08:24:12 -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=NvOlq2mk9v6daY2l0CAM3tPkSag4vtqBxjBjpLjURWQ=; b=rrMza2DqRI7M 1RrvzDBzlVlYp370ZDFUPMiHYdr14bA31CnzdL88as6YIxnMwA7cSFfqjvpRG+oPSn92935i2KPO0 gC+p4B/xOwP70itGcy0BDZO/a740S3Guvu+axjfeowg/+F8b8pNH1qQHgaqXA8W51M1rR/71uPWCf IgJxLxCoQIeeKpJYrfbNZbGF6t8jR2bL3K2fl0Xt2vxMTnAeeUoArmhEmOxm6nF6+nkSQilsYaCDe RwJ1cAqFWdGuWdMeqwM5qxvc6RsBfbeXzCbbUpJ/6gjNIpL1DDDFIAjFiPRJXwg0vOTGRIgR8zzVX 1qvUva3U7xKLQsfDlmhJlQ==; Date: Wed, 09 Oct 2024 15:24:02 +0300 Message-Id: <86jzeh4g7x.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <69964.1728432546@HIDDEN> (message from Mike Kupfer on Tue, 08 Oct 2024 17:09:06 -0700) References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Mike Kupfer <kupfer@HIDDEN> > cc: Eli Zaretskii <eliz@HIDDEN>, 60423 <at> debbugs.gnu.org > Comments: In-reply-to Stefan Kangas <stefankangas@HIDDEN> > message dated "Tue, 05 Sep 2023 16:31:18 -0700." > Date: Tue, 08 Oct 2024 17:09:06 -0700 > > 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? I think this is okay, if we don't have better tricks up our sleeves. I added Stefan Monnier in the hope that he could have some suggestions.
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 10 Oct 2024 23:47:02 +0000 Resent-Message-ID: <handler.60423.B60423.17286039993088 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.17286039993088 (code B ref 60423); Thu, 10 Oct 2024 23:47:02 +0000 Received: (at 60423) by debbugs.gnu.org; 10 Oct 2024 23:46:39 +0000 Received: from localhost ([127.0.0.1]:60890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sz2re-0000nk-OO for submit <at> debbugs.gnu.org; Thu, 10 Oct 2024 19:46:39 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:27016 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1sz2rc-0000nY-8N for 60423 <at> debbugs.gnu.org; Thu, 10 Oct 2024 19:46:37 -0400 Received: from alto.camomileplus.org (135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 49ANkGw0060799 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 10 Oct 2024 16:46:21 -0700 (PDT) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged) claimed to be alto.camomileplus.org From: Mike Kupfer <kupfer@HIDDEN> In-reply-to: <86jzeh4g7x.fsf@HIDDEN> References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> Comments: In-reply-to Eli Zaretskii <eliz@HIDDEN> message dated "Wed, 09 Oct 2024 15:24:02 +0300." X-Mailer: MH-E 8.6+git; nmh 1.8-RC2; Emacs 30.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <51017.1728603976.1@HIDDEN> Date: Thu, 10 Oct 2024 16:46:16 -0700 Message-ID: <51018.1728603976@HIDDEN> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii wrote: > > From: Mike Kupfer <kupfer@HIDDEN> [...] > > 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? thanks, mike
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 11 Oct 2024 05:48:02 +0000 Resent-Message-ID: <handler.60423.B60423.172862562712040 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mike Kupfer <kupfer@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.172862562712040 (code B ref 60423); Fri, 11 Oct 2024 05:48:02 +0000 Received: (at 60423) by debbugs.gnu.org; 11 Oct 2024 05:47:07 +0000 Received: from localhost ([127.0.0.1]:33139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sz8UV-000387-Ar for submit <at> debbugs.gnu.org; Fri, 11 Oct 2024 01:47:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1sz8UT-00037X-V3 for 60423 <at> debbugs.gnu.org; Fri, 11 Oct 2024 01:47:06 -0400 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 <eliz@HIDDEN>) 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==; Date: Fri, 11 Oct 2024 08:46:44 +0300 Message-Id: <86zfnbyywr.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <51018.1728603976@HIDDEN> (message from Mike Kupfer on Thu, 10 Oct 2024 16:46:16 -0700) References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> <51018.1728603976@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Mike Kupfer <kupfer@HIDDEN> > cc: Stefan Monnier <monnier@HIDDEN>, stefankangas@HIDDEN, > 60423 <at> debbugs.gnu.org > Comments: In-reply-to Eli Zaretskii <eliz@HIDDEN> > 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@HIDDEN> > [...] > > > 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.
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 12 Oct 2024 23:15:02 +0000 Resent-Message-ID: <handler.60423.B60423.172877485511269 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, Mike Kupfer <kupfer@HIDDEN>, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.172877485511269 (code B ref 60423); Sat, 12 Oct 2024 23:15:02 +0000 Received: (at 60423) by debbugs.gnu.org; 12 Oct 2024 23:14:15 +0000 Received: from localhost ([127.0.0.1]:38595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1szlJO-0002vg-KS for submit <at> debbugs.gnu.org; Sat, 12 Oct 2024 19:14:14 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1szlJN-0002vK-2Z for 60423 <at> debbugs.gnu.org; Sat, 12 Oct 2024 19:14:13 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E7519443495; Sat, 12 Oct 2024 19:13:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1728774830; bh=oWRrUCSKpcX9oaUWa+pt5rCbLSfYECMI06c0BDM6wJM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XXu9febBL7BsR6tOM3L/w8d6vaJh8d+kZdWjEXi8VxsS/iKQdGN/Rk2b5WEG5AZm/ UQWd2V41UUFUf1IJAAlXYypd+wovYmLEQjjI5Qy+artAvH9ZWry8lRt7SF0CxLmGoQ L62X6wEW4CHIRYwG9bu59o2BkN+xY4cNeqpSR4SN1GDEkAvEOXu5TsBqWIWUTDwm0z YgZuGap54k+KyPXTC060X5J5kujRy3lfJcJJKPavbKkPKyXlVnssxdg4r92m7tCiQo 1ay3bFntuwuJtCfiXWcNNTvV47GB60UZ8JEK52vwyJlY7M6ldY23UO/xaoGAyY+Zup i/TUMhRf1xF2w== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CE2BF443492; Sat, 12 Oct 2024 19:13:50 -0400 (EDT) Received: from pastel (104-195-209-82.cpe.teksavvy.com [104.195.209.82]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8BB091205FB; Sat, 12 Oct 2024 19:13:50 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <86jzeh4g7x.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 09 Oct 2024 15:24:02 +0300") Message-ID: <jwvplo4hqgg.fsf-monnier+emacs@HIDDEN> References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> Date: Sat, 12 Oct 2024 19:13:49 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.034 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) >> 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? > > I think this is okay, if we don't have better tricks up our sleeves. > I added Stefan Monnier in the hope that he could have some > suggestions. In this case the problem is that two packages compete for the same URL. I think it makes sense for goto-address to "leave text alone" in this case, but the question remains of how to detect *this* situation. The underlying text having a `face` property doesn't seem sufficient (especially since multiple `face` properties get merged, so the conflict is less severe). Maybe it should check for the presence of `help-echo and (follow-link or keymap)`? And make sure the those properties cover exactly the same chunk of text? Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 16 Oct 2024 21:47:02 +0000 Resent-Message-ID: <handler.60423.B60423.172911516927497 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.172911516927497 (code B ref 60423); Wed, 16 Oct 2024 21:47:02 +0000 Received: (at 60423) by debbugs.gnu.org; 16 Oct 2024 21:46:09 +0000 Received: from localhost ([127.0.0.1]:60732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1t1BqK-00079Q-N7 for submit <at> debbugs.gnu.org; Wed, 16 Oct 2024 17:46:09 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:29541 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1t1BqJ-00079H-6k for 60423 <at> debbugs.gnu.org; Wed, 16 Oct 2024 17:46:07 -0400 Received: from alto.camomileplus.org (135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 49GLjdr1015547 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Oct 2024 14:45:45 -0700 (PDT) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged) claimed to be alto.camomileplus.org In-reply-to: <86zfnbyywr.fsf@HIDDEN> References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> <51018.1728603976@HIDDEN> <86zfnbyywr.fsf@HIDDEN> Comments: In-reply-to Eli Zaretskii <eliz@HIDDEN> message dated "Fri, 11 Oct 2024 08:46:44 +0300." X-Mailer: MH-E 8.6+git; nmh 1.8-RC2; Emacs 30.0.91 From: Mike Kupfer <kupfer@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <63830.1729115139.1@HIDDEN> Date: Wed, 16 Oct 2024 14:45:39 -0700 Message-ID: <63831.1729115139@HIDDEN> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii wrote: > 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? Yes, goto-address also sets the 'help-echo' and 'mouse-face' properties, though the latter is only set for email addresses. (Sorry, I didn't call this out in my earlier email.) > Testing unrelated properties might give us false positives, so I think > we should avoid that. Agreed about trying to avoid false positives. The complete list of overlay properties that goto-address-fontify sets is - evaporate - face - follow-link - goto-address - help-echo - keymap - mouse-face We agree about checking for 'face'. I'm still holding out for checking for 'help-echo' and 'mouse-face'. After reviewing the documentation for the other properties, I'd also like to check for 'keymap' and 'follow-link'. I don't see a reason to check for 'evaporate'. 'goto-address' is not documented and appears to be used to mark the overlay as belonging to goto-address, so no need to check for it. mike
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 16 Oct 2024 21:54:02 +0000 Resent-Message-ID: <handler.60423.B60423.172911559728596 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.172911559728596 (code B ref 60423); Wed, 16 Oct 2024 21:54:02 +0000 Received: (at 60423) by debbugs.gnu.org; 16 Oct 2024 21:53:17 +0000 Received: from localhost ([127.0.0.1]:60750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1t1BxF-0007RA-2J for submit <at> debbugs.gnu.org; Wed, 16 Oct 2024 17:53:17 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:30127 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1t1BxC-0007R1-V1 for 60423 <at> debbugs.gnu.org; Wed, 16 Oct 2024 17:53:15 -0400 Received: from alto.camomileplus.org (135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 49GLqnUl016975 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Oct 2024 14:52:54 -0700 (PDT) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged) claimed to be alto.camomileplus.org From: Mike Kupfer <kupfer@HIDDEN> In-reply-to: <jwvplo4hqgg.fsf-monnier+emacs@HIDDEN> References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> <jwvplo4hqgg.fsf-monnier+emacs@HIDDEN> Comments: In-reply-to Stefan Monnier <monnier@HIDDEN> message dated "Sat, 12 Oct 2024 19:13:49 -0400." X-Mailer: MH-E 8.6+git; nmh 1.8-RC2; Emacs 30.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <66866.1729115569.1@HIDDEN> Date: Wed, 16 Oct 2024 14:52:49 -0700 Message-ID: <66867.1729115569@HIDDEN> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Stefan Monnier wrote: > In this case the problem is that two packages compete for the same URL. > I think it makes sense for goto-address to "leave text alone" in this > case, but the question remains of how to detect *this* situation. > > The underlying text having a `face` property doesn't seem sufficient > (especially since multiple `face` properties get merged, so the > conflict is less severe). > Maybe it should check for the presence of `help-echo and (follow-link > or keymap)`? And make sure the those properties cover exactly the same > chunk of text? As far as covering the same chunk of text, I'll need to play with this some more to see what works. shr-tag-a inserts a warning emoji with a help-echo property, which goto-address somehow manages to clobber. That warning emoji is not something goto-address would normally be looking for. mike
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 27 Oct 2024 10:37:02 +0000 Resent-Message-ID: <handler.60423.B60423.173002539525399 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mike Kupfer <kupfer@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.173002539525399 (code B ref 60423); Sun, 27 Oct 2024 10:37:02 +0000 Received: (at 60423) by debbugs.gnu.org; 27 Oct 2024 10:36:35 +0000 Received: from localhost ([127.0.0.1]:43960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1t50dP-0006ba-Cm for submit <at> debbugs.gnu.org; Sun, 27 Oct 2024 06:36:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1t50dO-0006bO-2W for 60423 <at> debbugs.gnu.org; Sun, 27 Oct 2024 06:36:34 -0400 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 <eliz@HIDDEN>) id 1t50cj-00052c-6c; Sun, 27 Oct 2024 06:35:54 -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=UTQYLmlDWGyHDyWhXRSmToC1OkSm+q6A7Cs3XE7KY00=; b=Y01p89ohEWCz tA7jCVflQh7QhVU0qlLNM49E/0zoLvC09sUj/uB5kxbsACuqCFtrgQY/jH1y46PLTrVv4sdKzckAI MlkBNAL4TUXS3ClBq1c7Ul4JRpB1BfNNtO4uq3CI8GNZs9Smf4lxq1GkmT69IiEbdbwlArJBHtR8Z U4gRxDCHF5EkKMW+XqRlNFigdMVZop3HJdQJhNsRJw87yVc/quie+nPzIBrbeXkpCa0Fg4S5/853E l91njAWxAWfXPyx0YQail1nh+u7Xqo8jB8QfumGB6m42WRqlniBjdjNZD6bx7rZaKweMwiIoVjKg0 aayHEOyCz+J7kpQapHHhaA==; Date: Sun, 27 Oct 2024 12:35:49 +0200 Message-Id: <86ed41al4q.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <66867.1729115569@HIDDEN> (message from Mike Kupfer on Wed, 16 Oct 2024 14:52:49 -0700) References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> <jwvplo4hqgg.fsf-monnier+emacs@HIDDEN> <66867.1729115569@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Mike Kupfer <kupfer@HIDDEN> > cc: Eli Zaretskii <eliz@HIDDEN>, 60423 <at> debbugs.gnu.org, > stefankangas@HIDDEN > Comments: In-reply-to Stefan Monnier <monnier@HIDDEN> > message dated "Sat, 12 Oct 2024 19:13:49 -0400." > Date: Wed, 16 Oct 2024 14:52:49 -0700 > > Stefan Monnier wrote: > > > In this case the problem is that two packages compete for the same URL. > > I think it makes sense for goto-address to "leave text alone" in this > > case, but the question remains of how to detect *this* situation. > > > > The underlying text having a `face` property doesn't seem sufficient > > (especially since multiple `face` properties get merged, so the > > conflict is less severe). > > Maybe it should check for the presence of `help-echo and (follow-link > > or keymap)`? And make sure the those properties cover exactly the same > > chunk of text? > > As far as covering the same chunk of text, I'll need to play with this > some more to see what works. shr-tag-a inserts a warning emoji with a > help-echo property, which goto-address somehow manages to clobber. That > warning emoji is not something goto-address would normally be looking > for. Ping! How can we make some progress with this bug report?
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Mike Kupfer <kupfer@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 27 Oct 2024 19:26:02 +0000 Resent-Message-ID: <handler.60423.B60423.173005710624915 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.173005710624915 (code B ref 60423); Sun, 27 Oct 2024 19:26:02 +0000 Received: (at 60423) by debbugs.gnu.org; 27 Oct 2024 19:25:06 +0000 Received: from localhost ([127.0.0.1]:46397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1t58sr-0006Tn-Oy for submit <at> debbugs.gnu.org; Sun, 27 Oct 2024 15:25:06 -0400 Received: from shell1.rawbw.com ([198.144.192.42]:24319 ident=root) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kupfer@HIDDEN>) id 1t58sp-0006Te-HN for 60423 <at> debbugs.gnu.org; Sun, 27 Oct 2024 15:25:04 -0400 Received: from alto.camomileplus.org (135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged)) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 49RJOLtp059322 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 27 Oct 2024 12:24:26 -0700 (PDT) (envelope-from kupfer@HIDDEN) X-Authentication-Warning: shell1.rawbw.com: Host 135-180-174-211.dsl.dynamic.sonic.net [135.180.174.211] (may be forged) claimed to be alto.camomileplus.org From: Mike Kupfer <kupfer@HIDDEN> In-reply-to: <86ed41al4q.fsf@HIDDEN> References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> <jwvplo4hqgg.fsf-monnier+emacs@HIDDEN> <66867.1729115569@HIDDEN> <86ed41al4q.fsf@HIDDEN> Comments: In-reply-to Eli Zaretskii <eliz@HIDDEN> message dated "Sun, 27 Oct 2024 12:35:49 +0200." X-Mailer: MH-E 8.6+git; nmh 1.8-RC2; Emacs 30.0.91 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 27 Oct 2024 12:24:21 -0700 Message-ID: <32125.1730057061@HIDDEN> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii wrote: > > From: Mike Kupfer <kupfer@HIDDEN> [...] > > Stefan Monnier wrote: [...] > > > Maybe it should check for the presence of `help-echo and (follow-link > > > or keymap)`? And make sure the those properties cover exactly the sa= me > > > chunk of text? > >=20 > > As far as covering the same chunk of text, I'll need to play with this > > some more to see what works. shr-tag-a inserts a warning emoji with a > > help-echo property, which goto-address somehow manages to clobber. That > > warning emoji is not something goto-address would normally be looking > > for. >=20 > Ping! How can we make some progress with this bug report? I did figure out why goto-address is clobbering the help-echo property on the warning emoji. goto-address uses goto-address-url-regexp to identify URLs. shr puts the emoji immediately after the suspicious URL, and apparently the regexp includes the emoji as part of the URL. https://badurl.com=E2=9A=A0=EF=B8=8F I haven't completely reverse-engineered the regexp. I see that it's built from a list of URI schemes and thing-at-point-url-path-regexp. Maybe thing-at-point-url-path-regexp needs to be pickier? But I don't understand how things should work in light of internationalized URLs. I've thought about having goto-address bail out if there are any conflicting properties in the range that it wants to overlay, but I haven't had time to prototype it to see how well that works. I suppose another possibility would be to move the warning emoji: put it in front of the suspicious URL, rather than after the URL. WDYT? mike
X-Loop: help-debbugs@HIDDEN Subject: bug#60423: 29.0.60; goto-address and shr/textsec don't play nicely together Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 02 Nov 2024 11:11:01 +0000 Resent-Message-ID: <handler.60423.B60423.173054584227915 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mike Kupfer <kupfer@HIDDEN> Cc: 60423 <at> debbugs.gnu.org, monnier@HIDDEN, stefankangas@HIDDEN Received: via spool by 60423-submit <at> debbugs.gnu.org id=B60423.173054584227915 (code B ref 60423); Sat, 02 Nov 2024 11:11:01 +0000 Received: (at 60423) by debbugs.gnu.org; 2 Nov 2024 11:10:42 +0000 Received: from localhost ([127.0.0.1]:53287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1t7C1h-0007GB-VU for submit <at> debbugs.gnu.org; Sat, 02 Nov 2024 07:10:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1t7C1f-0007G3-Rl for 60423 <at> debbugs.gnu.org; Sat, 02 Nov 2024 07:10:40 -0400 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 <eliz@HIDDEN>) id 1t7C1X-0004PJ-5E; Sat, 02 Nov 2024 07:10:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=8rdHQglp5yi5yqWFXuXKfyNnO4YMPx5PTrqad55Oup0=; b=rRMQqd83WVBwL8hpFEe9 1zY93t+atWYyG0VWFKh72jX5xe1NF7DG40ZeYGWRaOW6kjfQRa1XoeaL07SqYC5C+hn/nllMKPEz5 4b8cJdbGguvE5Bj0PSJ6qkdHaSFcQtUp6PHdQLQm3+ebv+67dDc65u884RqYw1J4BXPj0qlQrwmbr p/Mxu/8DRC1nTvzsDlLneciKJ+q4LlkZ0t2e/TOI/lDJ4bxGouQh40bXOHDIJGdipa99ZmB1tY2Ed Mfnt2/hYbyrt4Iwm2yvHi35CHsri/m38KhpoVyJkuQ5OQO6lDTzV3lVUxuQ941WhmiQH4J37uI4Lw k08ObDaNS3ZJIg==; Date: Sat, 02 Nov 2024 13:10:27 +0200 Message-Id: <86fro9zyak.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <32125.1730057061@HIDDEN> (message from Mike Kupfer on Sun, 27 Oct 2024 12:24:21 -0700) References: <175894.1672372745@alto> <831qoh6j0i.fsf@HIDDEN> <CADwFkmnPmKGSWoj5pt6XROWkWF0bu4dcO021yZ9QCP7LiSqxKQ@HIDDEN> <69964.1728432546@HIDDEN> <86jzeh4g7x.fsf@HIDDEN> <jwvplo4hqgg.fsf-monnier+emacs@HIDDEN> <66867.1729115569@HIDDEN> <86ed41al4q.fsf@HIDDEN> <32125.1730057061@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Mike Kupfer <kupfer@HIDDEN> > cc: monnier@HIDDEN, 60423 <at> debbugs.gnu.org, stefankangas@HIDDEN > Comments: In-reply-to Eli Zaretskii <eliz@HIDDEN> > message dated "Sun, 27 Oct 2024 12:35:49 +0200." > Date: Sun, 27 Oct 2024 12:24:21 -0700 > > Eli Zaretskii wrote: > > > > From: Mike Kupfer <kupfer@HIDDEN> > [...] > > > Stefan Monnier wrote: > [...] > > > > Maybe it should check for the presence of `help-echo and (follow-link > > > > or keymap)`? And make sure the those properties cover exactly the same > > > > chunk of text? > > > > > > As far as covering the same chunk of text, I'll need to play with this > > > some more to see what works. shr-tag-a inserts a warning emoji with a > > > help-echo property, which goto-address somehow manages to clobber. That > > > warning emoji is not something goto-address would normally be looking > > > for. > > > > Ping! How can we make some progress with this bug report? > > I did figure out why goto-address is clobbering the help-echo property > on the warning emoji. goto-address uses goto-address-url-regexp to > identify URLs. shr puts the emoji immediately after the suspicious URL, > and apparently the regexp includes the emoji as part of the URL. > > https://badurl.com⚠️ > > I haven't completely reverse-engineered the regexp. I see that it's > built from a list of URI schemes and thing-at-point-url-path-regexp. > Maybe thing-at-point-url-path-regexp needs to be pickier? But I don't > understand how things should work in light of internationalized URLs. > > I've thought about having goto-address bail out if there are any > conflicting properties in the range that it wants to overlay, but I > haven't had time to prototype it to see how well that works. > > I suppose another possibility would be to move the warning emoji: put it > in front of the suspicious URL, rather than after the URL. > > WDYT? Maybe moving the warning emoji to the front is the easiest and the most robust solution.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.