forked from mirrors/org-mode
Allow relative links to doc-view files.
Patch by Jan Bker.
This commit is contained in:
parent
f6b2591412
commit
1af7fdfdcd
|
@ -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 <carsten.dominik@gmail.com>
|
||||
|
||||
|
|
|
@ -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))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue