diff --git a/lisp/org.el b/lisp/org.el index df511e7c0..a2c6359cd 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8704,8 +8704,9 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (t (save-match-data (if (string-match (concat "^" (regexp-quote - (file-name-as-directory - default-directory))) + (expand-file-name + (file-name-as-directory + default-directory)))) (expand-file-name path)) ;; We are linking a file with relative path name. (setq path (substring (expand-file-name path)