diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4fc4ad064..a6dfb7048 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * org.el (org-clean-visibility-after-subtree-move): Only fix entries that are not entirely invisible already. + (org-insert-link): Respect org-link-file-path-type for + "docview:" links in addition to "file:" links. 2009-12-03 Carsten Dominik diff --git a/lisp/org.el b/lisp/org.el index 0c6017e81..02b32e3e7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7978,8 +7978,9 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (setq link search))))) ;; Check if we can/should use a relative path. If yes, simplify the link - (when (string-match "^file:\\(.*\\)" link) - (let* ((path (match-string 1 link)) + (when (string-match "^\\(file:\\|docview:\\)\\(.*\\)" link) + (let* ((type (match-string 1 link)) + (path (match-string 2 link)) (origpath path) (case-fold-search nil)) (cond @@ -8000,7 +8001,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (setq path (substring (expand-file-name path) (match-end 0))) (setq path (abbreviate-file-name (expand-file-name path))))))) - (setq link (concat "file:" path)) + (setq link (concat type path)) (if (equal desc origpath) (setq desc path))))