From unknown Sun Aug 10 16:45:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23343: 25.0.93; URI schemes are not regexp-quoted for `goto-address-url-regexp' Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Apr 2016 13:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23343@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146141950415476 (code B ref -1); Sat, 23 Apr 2016 13:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Apr 2016 13:51:44 +0000 Received: from localhost ([127.0.0.1]:43705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atxyK-00041X-7a for submit@debbugs.gnu.org; Sat, 23 Apr 2016 09:51:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1atxyI-00041L-NV for submit@debbugs.gnu.org; Sat, 23 Apr 2016 09:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atxyC-0007dY-SV for submit@debbugs.gnu.org; Sat, 23 Apr 2016 09:51:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atxyC-0007dU-Oh for submit@debbugs.gnu.org; Sat, 23 Apr 2016 09:51:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atxyC-00074z-1Z for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2016 09:51:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atxy8-0007av-SG for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2016 09:51:35 -0400 Received: from [219.88.242.59] (port=56882 helo=mail.orcon.net.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atxy8-0007VQ-BZ for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2016 09:51:32 -0400 Received: from [192.168.20.100] (host-203-94-60-222.xdsl.kinect.net.nz [203.94.60.222] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id u3NDp9Pv011450 for ; Sun, 24 Apr 2016 01:51:10 +1200 From: Phil Sainty Message-ID: <571B7DCC.5090506@orcon.net.nz> Date: Sun, 24 Apr 2016 01:51:08 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.5 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-CanIt-Geo: ip=203.94.60.222; country=NZ; region=Waikato; city=Hamilton; latitude=-37.7610; longitude=175.2474; http://maps.google.com/maps?q=-37.7610,175.2474&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 02QJNP9FI - dbc579757f76 - 20160424 X-Scanned-By: CanIt (www . roaringpenguin . com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) The URI schemes from `thing-at-point-uri-schemes' are concatenated into a regexp group without being suitably escaped, meaning there are bugs whenever regexp meta-characters appear. e.g.: bzr+ssh:// iris.beep: From unknown Sun Aug 10 16:45:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23343: 25.0.93; [PATCH] URI schemes are not regexp-quoted for `goto-address-url-regexp' Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Apr 2016 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23343@debbugs.gnu.org Received: via spool by 23343-submit@debbugs.gnu.org id=B23343.146142017016898 (code B ref 23343); Sat, 23 Apr 2016 14:03:01 +0000 Received: (at 23343) by debbugs.gnu.org; 23 Apr 2016 14:02:50 +0000 Received: from localhost ([127.0.0.1]:44148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aty94-0004OU-A7 for submit@debbugs.gnu.org; Sat, 23 Apr 2016 10:02:50 -0400 Received: from [219.88.242.52] (port=52071 helo=mail.orcon.net.nz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aty91-0004OJ-Nt for 23343@debbugs.gnu.org; Sat, 23 Apr 2016 10:02:48 -0400 Received: from [192.168.20.100] (host-203-94-60-222.xdsl.kinect.net.nz [203.94.60.222] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id u3NE2eiZ028285 for <23343@debbugs.gnu.org>; Sun, 24 Apr 2016 02:02:41 +1200 References: <571B7DCC.5090506@orcon.net.nz> From: Phil Sainty Message-ID: <571B8080.90009@orcon.net.nz> Date: Sun, 24 Apr 2016 02:02:40 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <571B7DCC.5090506@orcon.net.nz> Content-Type: multipart/mixed; boundary="------------040109020806040006060005" X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-Spam-Score: -1.71 () [Hold at 3.00] FREEMAIL_FROM:0.001, RDNS_NONE:1.274, TO_NO_BRKTS_NORDNS:0.001, T_TO_NO_BRKTS_FREEMAIL:0.01, CC(NZ:-3) X-CanIt-Geo: ip=203.94.60.222; country=NZ; region=Waikato; city=Hamilton; latitude=-37.7610; longitude=175.2474; http://maps.google.com/maps?q=-37.7610,175.2474&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 01QJO2ELB - 95c3bcd73d43 - 20160424 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This could be resolved with - (mapconcat 'identity + (mapconcat 'regexp-quote But on account of http://stackoverflow.com/questions/36787889/how-to-remove-some-link-type-in-emacs I thought that making it easier to customise this feature was a useful improvement to make. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This could be resolved with - (mapconcat 'identity + (mapconcat 'regexp-quote But on account of http://stackoverflow.com/questions/36787889/how-to-remove-some-link-type-in-emacs I thought that making it easier to customise this feature was a useful improvement to make. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS This is a multi-part message in MIME format. --------------040109020806040006060005 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit This could be resolved with - (mapconcat 'identity + (mapconcat 'regexp-quote But on account of http://stackoverflow.com/questions/36787889/how-to-remove-some-link-type-in-emacs I thought that making it easier to customise this feature was a useful improvement to make. -Phil --------------040109020806040006060005 Content-Type: text/x-patch; name="0001-Fix-goto-address-url-regexp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-goto-address-url-regexp.patch" >From 0d7a39a1c56700020127c01a622d13c27aec498d Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Sun, 24 Apr 2016 01:40:47 +1200 Subject: [PATCH] Fix `goto-address-url-regexp' * lisp/net/goto-addr.el: The URI schemes to be recognised by `goto-address-mode' were not regexp-quoted. (Bug#23343) --- lisp/net/goto-addr.el | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index bc3c403..e4bbf76 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -59,6 +59,7 @@ ;;; Code: +(require 'seq) (require 'thingatpt) (autoload 'browse-url-url-at-point "browse-url") @@ -101,23 +102,26 @@ goto-address-mail-regexp "[-a-zA-Z0-9=._+]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" "A regular expression probably matching an e-mail address.") +(defvar goto-address-uri-schemes-ignored + ;; By default we exclude `mailto:' (email addresses are matched + ;; by `goto-address-mail-regexp') and also `data:', as it is not + ;; terribly useful to follow those URIs, and leaving them causes + ;; `use Data::Dumper;' to be fontified oddly in Perl files. + '("mailto:" "data:") + "List of URI schemes to exclude from `goto-address-uri-schemes'.") + +(defvar goto-address-uri-schemes + ;; We use `thing-at-point-uri-schemes', with a few exclusions, + ;; as listed in `goto-address-uri-schemes-ignored'. + (seq-reduce (lambda (accum elt) (delete elt accum)) + goto-address-uri-schemes-ignored + (copy-sequence thing-at-point-uri-schemes)) + "List of URI schemes matched by `goto-address-url-regexp'.") + (defvar goto-address-url-regexp - (concat - "\\<\\(" - (mapconcat 'identity - (delete "mailto:" - ;; Remove `data:', as it's not terribly useful to follow - ;; those. Leaving them causes `use Data::Dumper;' to be - ;; fontified oddly in Perl files. - (delete "data:" - (copy-sequence thing-at-point-uri-schemes))) - "\\|") - "\\)" - thing-at-point-url-path-regexp) - ;; (concat "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|" - ;; "telnet\\|wais\\):\\(//[-a-zA-Z0-9_.]+:" - ;; "[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*" - ;; "[-a-zA-Z0-9_=#$@~`%&*+|\\/]") + (concat "\\<" + (regexp-opt goto-address-uri-schemes t) + thing-at-point-url-path-regexp) "A regular expression probably matching a URL.") (defvar goto-address-highlight-keymap -- 2.8.0 --------------040109020806040006060005-- From unknown Sun Aug 10 16:45:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23343: 25.0.93; [PATCH] URI schemes are not regexp-quoted for `goto-address-url-regexp' Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Apr 2016 22:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23343@debbugs.gnu.org Received: via spool by 23343-submit@debbugs.gnu.org id=B23343.14614516922839 (code B ref 23343); Sat, 23 Apr 2016 22:49:02 +0000 Received: (at 23343) by debbugs.gnu.org; 23 Apr 2016 22:48:12 +0000 Received: from localhost ([127.0.0.1]:44376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au6LU-0000jj-6r for submit@debbugs.gnu.org; Sat, 23 Apr 2016 18:48:12 -0400 Received: from [219.88.242.56] (port=38073 helo=mail.orcon.net.nz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1au6LS-0000jZ-Bq for 23343@debbugs.gnu.org; Sat, 23 Apr 2016 18:48:11 -0400 Received: from [192.168.20.100] (host-203-94-60-222.xdsl.kinect.net.nz [203.94.60.222] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id u3NMm4mQ029592 for <23343@debbugs.gnu.org>; Sun, 24 Apr 2016 10:48:05 +1200 References: <571B7DCC.5090506@orcon.net.nz> <571B8080.90009@orcon.net.nz> From: Phil Sainty Message-ID: <571BFBA4.8070503@orcon.net.nz> Date: Sun, 24 Apr 2016 10:48:04 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <571B8080.90009@orcon.net.nz> Content-Type: multipart/mixed; boundary="------------090006060502080504060907" X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-Spam-Score: -1.71 () [Hold at 3.00] FREEMAIL_FROM:0.001, RDNS_NONE:1.274, TO_NO_BRKTS_NORDNS:0.001, T_TO_NO_BRKTS_FREEMAIL:0.01, CC(NZ:-3) X-CanIt-Geo: ip=203.94.60.222; country=NZ; region=Waikato; city=Hamilton; latitude=-37.7610; longitude=175.2474; http://maps.google.com/maps?q=-37.7610,175.2474&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 01QJWM5jj - f0a0bf12ec30 - 20160424 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've made docstring changes to point out that it's only useful to set goto-address-uri-schemes-ignored and goto-address-uri-schemes prior to loading the library. I'm not sure if there's any policy about such things, but it seemed like it would be quite a lot more work to get around that. I imagine the :set ability of defcustom would make it possible to have changes to those variables dynamically update goto-address-url-regexp as well; but in doing that you'd need to take care not to clobber values which had themselves been customized also, and it all seemed like a lot of added complexity for little benefit. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [219.88.242.56 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [219.88.242.56 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've made docstring changes to point out that it's only useful to set goto-address-uri-schemes-ignored and goto-address-uri-schemes prior to loading the library. I'm not sure if there's any policy about such things, but it seemed like it would be quite a lot more work to get around that. I imagine the :set ability of defcustom would make it possible to have changes to those variables dynamically update goto-address-url-regexp as well; but in doing that you'd need to take care not to clobber values which had themselves been customized also, and it all seemed like a lot of added complexity for little benefit. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [219.88.242.56 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [219.88.242.56 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS This is a multi-part message in MIME format. --------------090006060502080504060907 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit I've made docstring changes to point out that it's only useful to set goto-address-uri-schemes-ignored and goto-address-uri-schemes prior to loading the library. I'm not sure if there's any policy about such things, but it seemed like it would be quite a lot more work to get around that. I imagine the :set ability of defcustom would make it possible to have changes to those variables dynamically update goto-address-url-regexp as well; but in doing that you'd need to take care not to clobber values which had themselves been customized also, and it all seemed like a lot of added complexity for little benefit. -Phil --------------090006060502080504060907 Content-Type: text/x-patch; name="0001-Fix-goto-address-url-regexp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-goto-address-url-regexp.patch" >From 9cbe7647f7f1558274afaabb26c84d85f3e6c6a4 Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Sun, 24 Apr 2016 01:40:47 +1200 Subject: [PATCH] Fix `goto-address-url-regexp' * lisp/net/goto-addr.el: The URI schemes to be recognised by `goto-address-mode' were not regexp-quoted. (Bug#23343) --- lisp/net/goto-addr.el | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index bc3c403..e8d1b62 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -59,6 +59,7 @@ ;;; Code: +(require 'seq) (require 'thingatpt) (autoload 'browse-url-url-at-point "browse-url") @@ -101,23 +102,30 @@ goto-address-mail-regexp "[-a-zA-Z0-9=._+]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" "A regular expression probably matching an e-mail address.") +(defvar goto-address-uri-schemes-ignored + ;; By default we exclude `mailto:' (email addresses are matched + ;; by `goto-address-mail-regexp') and also `data:', as it is not + ;; terribly useful to follow those URIs, and leaving them causes + ;; `use Data::Dumper;' to be fontified oddly in Perl files. + '("mailto:" "data:") + "List of URI schemes to exclude from `goto-address-uri-schemes'. + +Customisations made after goto-addr is loaded will have no effect.") + +(defvar goto-address-uri-schemes + ;; We use `thing-at-point-uri-schemes', with a few exclusions, + ;; as listed in `goto-address-uri-schemes-ignored'. + (seq-reduce (lambda (accum elt) (delete elt accum)) + goto-address-uri-schemes-ignored + (copy-sequence thing-at-point-uri-schemes)) + "List of URI schemes matched by `goto-address-url-regexp'. + +Customisations made after goto-addr is loaded will have no effect.") + (defvar goto-address-url-regexp - (concat - "\\<\\(" - (mapconcat 'identity - (delete "mailto:" - ;; Remove `data:', as it's not terribly useful to follow - ;; those. Leaving them causes `use Data::Dumper;' to be - ;; fontified oddly in Perl files. - (delete "data:" - (copy-sequence thing-at-point-uri-schemes))) - "\\|") - "\\)" - thing-at-point-url-path-regexp) - ;; (concat "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|" - ;; "telnet\\|wais\\):\\(//[-a-zA-Z0-9_.]+:" - ;; "[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*" - ;; "[-a-zA-Z0-9_=#$@~`%&*+|\\/]") + (concat "\\<" + (regexp-opt goto-address-uri-schemes t) + thing-at-point-url-path-regexp) "A regular expression probably matching a URL.") (defvar goto-address-highlight-keymap -- 2.8.0 --------------090006060502080504060907-- From unknown Sun Aug 10 16:45:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23343: 25.0.93; [PATCH] URI schemes are not regexp-quoted for `goto-address-url-regexp' Resent-From: Lars Magne Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Apr 2016 11:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phil Sainty Cc: 23343@debbugs.gnu.org Received: via spool by 23343-submit@debbugs.gnu.org id=B23343.146149782215182 (code B ref 23343); Sun, 24 Apr 2016 11:38:02 +0000 Received: (at 23343) by debbugs.gnu.org; 24 Apr 2016 11:37:02 +0000 Received: from localhost ([127.0.0.1]:44510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auILT-0003wV-Hm for submit@debbugs.gnu.org; Sun, 24 Apr 2016 07:37:02 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:37633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auILO-0003wI-EQ for 23343@debbugs.gnu.org; Sun, 24 Apr 2016 07:36:58 -0400 Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1auILI-0002ed-98; Sun, 24 Apr 2016 13:36:52 +0200 From: Lars Magne Ingebrigtsen References: <571B7DCC.5090506@orcon.net.nz> <571B8080.90009@orcon.net.nz> <571BFBA4.8070503@orcon.net.nz> Date: Sun, 24 Apr 2016 13:36:47 +0200 In-Reply-To: <571BFBA4.8070503@orcon.net.nz> (Phil Sainty's message of "Sun, 24 Apr 2016 10:48:04 +1200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Phil Sainty writes: > I've made docstring changes to point out that it's only useful to > set goto-address-uri-schemes-ignored and goto-address-uri-schemes > prior to loading the library. > > I'm not sure if there's any policy about such things, but it seemed > like it would be quite a lot more work to get around that. I imagine > the :set ability of defcustom would make it possible to have changes > to those variables dynamically update goto-address-url-regexp as well; > but in doing that you'd need to take care not to clobber values which > had themselves been customized also, and it all seemed like a lot of > added complexity for little benefit. Having variable defaults depend on each other can be awkward, especially when it's the "first" variable that users will realistically be tweaking. [...] > +(defvar goto-address-uri-schemes-ignored > + ;; By default we exclude `mailto:' (email addresses are matched > + ;; by `goto-address-mail-regexp') and also `data:', as it is not > + ;; terribly useful to follow those URIs, and leaving them causes > + ;; `use Data::Dumper;' to be fontified oddly in Perl files. > + '("mailto:" "data:") Which is this one. But I don't really see how to fix that without having a different interface here (i.e., getting rid of goto-address-url-regexp), so perhaps it's OK... But: > +(defvar goto-address-uri-schemes > + ;; We use `thing-at-point-uri-schemes', with a few exclusions, > + ;; as listed in `goto-address-uri-schemes-ignored'. > + (seq-reduce (lambda (accum elt) (delete elt accum)) > + goto-address-uri-schemes-ignored > + (copy-sequence thing-at-point-uri-schemes)) I don't much value to this "intermediate" variable. It just makes things even more complicated to work with, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Aug 10 16:45:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23343: 25.0.93; [PATCH] URI schemes are not regexp-quoted for `goto-address-url-regexp' Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Apr 2016 13:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Magne Ingebrigtsen Cc: 23343@debbugs.gnu.org Received: via spool by 23343-submit@debbugs.gnu.org id=B23343.14615056997380 (code B ref 23343); Sun, 24 Apr 2016 13:49:02 +0000 Received: (at 23343) by debbugs.gnu.org; 24 Apr 2016 13:48:19 +0000 Received: from localhost ([127.0.0.1]:44636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auKOY-0001ux-RN for submit@debbugs.gnu.org; Sun, 24 Apr 2016 09:48:18 -0400 Received: from [219.88.242.62] (port=52276 helo=mail.orcon.net.nz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1auKOX-0001un-DH for 23343@debbugs.gnu.org; Sun, 24 Apr 2016 09:48:18 -0400 Received: from [192.168.20.100] (host-203-94-60-222.xdsl.kinect.net.nz [203.94.60.222] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id u3ODmAPT033676; Mon, 25 Apr 2016 01:48:11 +1200 References: <571B7DCC.5090506@orcon.net.nz> <571B8080.90009@orcon.net.nz> <571BFBA4.8070503@orcon.net.nz> From: Phil Sainty Message-ID: <571CCE9A.1020103@orcon.net.nz> Date: Mon, 25 Apr 2016 01:48:10 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-Spam-Score: -1.73 () [Hold at 3.00] FREEMAIL_FROM:0.001, RDNS_NONE:1.274, CC(NZ:-3) X-CanIt-Geo: ip=203.94.60.222; country=NZ; region=Waikato; city=Hamilton; latitude=-37.7610; longitude=175.2474; http://maps.google.com/maps?q=-37.7610,175.2474&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 02QKdMbId - 3dcc044ea958 - 20160425 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 24/04/16 23:36, Lars Magne Ingebrigtsen wrote: > Having variable defaults depend on each other can be awkward, especially > when it's the "first" variable that users will realistically be > tweaking. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 24/04/16 23:36, Lars Magne Ingebrigtsen wrote: > Having variable defaults depend on each other can be awkward, especially > when it's the "first" variable that users will realistically be > tweaking. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (psainty[at]orcon.net.nz) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS On 24/04/16 23:36, Lars Magne Ingebrigtsen wrote: > Having variable defaults depend on each other can be awkward, especially > when it's the "first" variable that users will realistically be > tweaking. Yes indeed. I don't especially like the way I've done it -- but it seemed like an improvement, nevertheless. >> +(defvar goto-address-uri-schemes > > I don't much value to this "intermediate" variable. It just makes > things even more complicated to work with, I think. It's true that this one is an intermediate by default; but it's one which users might potentially want to set in order to say "I don't care about the default schemes at all; I only want the specific schemes I've specified here to be matched." So of the two new variables I'm adding, a user might set one or the other depending on their needs. That was my line of thought, anyhow. -Phil From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 19:16:30 2016 Received: (at control) by debbugs.gnu.org; 25 Apr 2016 23:16:30 +0000 Received: from localhost ([127.0.0.1]:47086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aupjy-0001Be-6M for submit@debbugs.gnu.org; Mon, 25 Apr 2016 19:16:30 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:49565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aupjw-0001A1-Mo for control@debbugs.gnu.org; Mon, 25 Apr 2016 19:16:29 -0400 Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1aupju-0001Hr-Fi for control@debbugs.gnu.org; Tue, 26 Apr 2016 01:16:28 +0200 Date: Tue, 26 Apr 2016 01:16:26 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #23343 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 23343 patch From unknown Sun Aug 10 16:45:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23343: 25.0.93; [PATCH] URI schemes are not regexp-quoted for `goto-address-url-regexp' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2019 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Phil Sainty Cc: 23343@debbugs.gnu.org Received: via spool by 23343-submit@debbugs.gnu.org id=B23343.156147136431747 (code B ref 23343); Tue, 25 Jun 2019 14:03:02 +0000 Received: (at 23343) by debbugs.gnu.org; 25 Jun 2019 14:02:44 +0000 Received: from localhost ([127.0.0.1]:33076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfm20-0008FL-CK for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:02:44 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfm1y-0008Dy-KQ for 23343@debbugs.gnu.org; Tue, 25 Jun 2019 10:02:43 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfm1u-0000ck-3U; Tue, 25 Jun 2019 16:02:40 +0200 From: Lars Ingebrigtsen References: <571B7DCC.5090506@orcon.net.nz> <571B8080.90009@orcon.net.nz> <571BFBA4.8070503@orcon.net.nz> <571CCE9A.1020103@orcon.net.nz> Date: Tue, 25 Jun 2019 16:02:37 +0200 In-Reply-To: <571CCE9A.1020103@orcon.net.nz> (Phil Sainty's message of "Mon, 25 Apr 2016 01:48:10 +1200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Phil Sainty writes: > It's true that this one is an intermediate by default; but it's one > which users might potentially want to set in order to say "I don't > care about the default schemes at all; I only want the spec [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Phil Sainty writes: > It's true that this one is an intermediate by default; but it's one > which users might potentially want to set in order to say "I don't > care about the default schemes at all; I only want the specific > schemes I've specified here to be matched." > > So of the two new variables I'm adding, a user might set one or the > other depending on their needs. That was my line of thought, anyhow. That's true. I've now applied your patch to the Emacs trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 10:02:52 2019 Received: (at control) by debbugs.gnu.org; 25 Jun 2019 14:02:52 +0000 Received: from localhost ([127.0.0.1]:33079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfm25-0008Hh-Pf for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:02:51 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfm23-0008HX-MB for control@debbugs.gnu.org; Tue, 25 Jun 2019 10:02:48 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfm21-0000cv-49 for control@debbugs.gnu.org; Tue, 25 Jun 2019 16:02:47 +0200 Date: Tue, 25 Jun 2019 16:02:44 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #23343 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 23343 fixed close 23343 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 23343 fixed close 23343 27.1 quit