diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-04-02 23:15:22 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-04-02 23:15:22 +0200 |
commit | e5d05e881a19147be323c589ede3bdee85dfb38f (patch) | |
tree | 71ec876151ae838a86f39fb52301b33e3b075dbc | |
parent | da517aaeb80fac32fa2c23cbc3940f50c708e428 (diff) | |
download | org-mode-e5d05e881a19147be323c589ede3bdee85dfb38f.tar.gz |
ORG-NEWS: Use less conservative link update function
-rw-r--r-- | etc/ORG-NEWS | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 4d9530a..a2e9057 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -54,18 +54,11 @@ is non-nil." (goto-char uri-start) (re-search-forward "\\][][]" nil t) (match-beginning 0))) - (uri (buffer-substring-no-properties uri-start uri-end)) - (start 0)) - (when (catch :obsolete - (while (string-match "%\\(..\\)?" uri start) - (setq start (match-end 0)) - (unless (member (match-string 1 uri) - '("25" "5B" "5D" "20")) - (throw :obsolete nil))) - (or no-query - (y-or-n-p - (format "Possibly obsolete URI syntax: %S. Update?" - uri)))) + (uri (buffer-substring-no-properties uri-start uri-end))) + (when (or no-query + (y-or-n-p + (format "Possibly obsolete URI syntax: %S. Fix? " + uri))) (setf (buffer-substring uri-start uri-end) (org-link-escape (org-link-decode uri))))))))))) #+end_src |