From 10301ab1ffa9ff881c4c9a2c735439ff7ed64c67 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 9 Apr 2017 20:44:10 -0400 Subject: [PATCH] org-insert-link: Correct changes from a08dd527d * lisp/org.el (org-insert-link): Fix regexp and undefined variable. --- lisp/org.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index e64480cbe..dd9c43664 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10560,10 +10560,10 @@ Use TAB to complete link prefixes, then RET for type-specific completion support ;; Check if we can/should use a relative path. If yes, simplify the link (let ((case-fold-search nil)) - (when (string-match "\\`\\(file:\\|docview\\):" link) - (let ((type (match-string-no-properties 0 link)) - (path (substring-no-properties link (match-end 0))) - (origpath path)) + (when (string-match "\\`\\(file\\|docview\\):" link) + (let* ((type (match-string-no-properties 0 link)) + (path (substring-no-properties link (match-end 0))) + (origpath path)) (cond ((or (eq org-link-file-path-type 'absolute) (equal complete-file '(16))) -- 2.11.4.GIT