diff options
author | Kyle Meyer <kyle@kyleam.com> | 2017-03-02 18:26:49 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2017-03-03 00:24:34 -0500 |
commit | 2640ec50be9dcf199ed9f5af707ee822a6742cf9 (patch) | |
tree | 9b7052b448ddcdd6423298d7622ba24ec5e72cc5 | |
parent | 99a810f55b5d4ca8b84215b368b0722ac3291265 (diff) | |
download | org-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.el | 3 |
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)) ""))) |