diff options
author | Rasmus <rasmus@gmx.us> | 2017-09-18 12:01:12 +0200 |
---|---|---|
committer | Rasmus <rasmus@gmx.us> | 2017-09-18 12:01:12 +0200 |
commit | ab351d442d7bb4d17cbb43638aaed1775d8c0344 (patch) | |
tree | 19da4c93526d3de543efe21a53ab2d098fb9f50b /lisp/org/org-info.el | |
parent | 5490ccc5ebf39759dfd084bbd31f464701a3e775 (diff) | |
download | emacs-ab351d442d7bb4d17cbb43638aaed1775d8c0344.tar.gz emacs-ab351d442d7bb4d17cbb43638aaed1775d8c0344.tar.bz2 emacs-ab351d442d7bb4d17cbb43638aaed1775d8c0344.zip |
Update Org to v9.1.1
Please see etc/ORG-NEWS for major changes.
Diffstat (limited to 'lisp/org/org-info.el')
-rw-r--r-- | lisp/org/org-info.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 088e0c7aa73..7f859f9040d 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el @@ -129,15 +129,19 @@ See `org-info-emacs-documents' and `org-info-other-documents' for details." (defun org-info-export (path desc format) "Export an info link. See `org-link-parameters' for details about PATH, DESC and FORMAT." - (when (eq format 'html) - (or (string-match "\\(.*\\)[#:]:?\\(.*\\)" path) - (string-match "\\(.*\\)" path)) - (let ((filename (match-string 1 path)) - (node (or (match-string 2 path) "Top"))) - (format "<a href=\"%s#%s\">%s</a>" - (org-info-map-html-url filename) - (org-info--expand-node-name node) - (or desc path))))) + (let* ((parts (split-string path "[#:]:?")) + (manual (car parts)) + (node (or (nth 1 parts) "Top"))) + (pcase format + (`html + (format "<a href=\"%s#%s\">%s</a>" + (org-info-map-html-url manual) + (org-info--expand-node-name node) + (or desc path))) + (`texinfo + (let ((title (or desc ""))) + (format "@ref{%s,%s,,%s,}" node title manual))) + (_ nil)))) (provide 'org-info) |