summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-03-02 18:26:49 -0500
committerKyle Meyer <kyle@kyleam.com>2017-03-03 00:24:34 -0500
commit2640ec50be9dcf199ed9f5af707ee822a6742cf9 (patch)
tree9b7052b448ddcdd6423298d7622ba24ec5e72cc5
parent99a810f55b5d4ca8b84215b368b0722ac3291265 (diff)
downloadorg-link-edit-2640ec50be9dcf199ed9f5af707ee822a6742cf9.tar.gz
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.
-rw-r--r--org-link-edit.el3
1 files changed, 2 insertions, 1 deletions
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))
"")))