From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 23343@debbugs.gnu.org
Subject: bug#23343: 25.0.93; [PATCH] URI schemes are not regexp-quoted for `goto-address-url-regexp'
Date: Sun, 24 Apr 2016 13:36:47 +0200 [thread overview]
Message-ID: <m3inz7ck6o.fsf@gnus.org> (raw)
In-Reply-To: <571BFBA4.8070503@orcon.net.nz> (Phil Sainty's message of "Sun, 24 Apr 2016 10:48:04 +1200")
Phil Sainty <psainty@orcon.net.nz> 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
next prev parent reply other threads:[~2016-04-24 11:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-23 13:51 bug#23343: 25.0.93; URI schemes are not regexp-quoted for `goto-address-url-regexp' Phil Sainty
2016-04-23 14:02 ` bug#23343: 25.0.93; [PATCH] " Phil Sainty
2016-04-23 22:48 ` Phil Sainty
2016-04-24 11:36 ` Lars Magne Ingebrigtsen [this message]
2016-04-24 13:48 ` Phil Sainty
2019-06-25 14:02 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3inz7ck6o.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=23343@debbugs.gnu.org \
--cc=psainty@orcon.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).