From 2640ec50be9dcf199ed9f5af707ee822a6742cf9 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 2 Mar 2017 18:26:49 -0500 Subject: Use save-match-data around org-link-unescape Before Org 8.3 (specifically before aea374680), org-link-unescape called string-match, which changes the match data and interferes with extracting the description. (I noticed this because the slurp/barf round-trip test failed with Org 8.2.10, but not on newer versions.) Save the match data before calling org-link-unescape. --- org-link-edit.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'org-link-edit.el') diff --git a/org-link-edit.el b/org-link-edit.el index 482db7b..27e8648 100644 --- a/org-link-edit.el +++ b/org-link-edit.el @@ -84,7 +84,8 @@ The list includes ((looking-at org-bracket-link-regexp) (list (match-beginning 0) (match-end 0) - (org-link-unescape (match-string-no-properties 1)) + (save-match-data + (org-link-unescape (match-string-no-properties 1))) (or (and (match-end 3) (match-string-no-properties 3)) ""))) -- cgit v1.2.3