summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-04-09 20:44:10 -0400
committerKyle Meyer <kyle@kyleam.com>2017-04-09 20:49:03 -0400
commit10301ab1ffa9ff881c4c9a2c735439ff7ed64c67 (patch)
treee0e8c674b37f5c4034e0ddca58624f624e062e43
parentdd40193bfaf2f2fa7cf6e6f333d98b431fd15b95 (diff)
downloadorg-mode-10301ab1ffa9ff881c4c9a2c735439ff7ed64c67.tar.gz
org-insert-link: Correct changes from a08dd527d
* lisp/org.el (org-insert-link): Fix regexp and undefined variable.
-rw-r--r--lisp/org.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el
index e64480c..dd9c436 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)))