diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-06-06 00:21:53 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-06-06 00:21:53 +0200 |
commit | 6f12dfbcb06a463bed9f0b4d53629dc3f147d351 (patch) | |
tree | 14071cb5fcde620eb69e9335aeaa27d5f3424a8d | |
parent | 439fcfbbf2215cc7fad8526d6fdbe3eb34d61bfe (diff) | |
download | org-mode-6f12dfbcb06a463bed9f0b4d53629dc3f147d351.tar.gz |
ox-texinfo: Fix @ref{...} handling
* lisp/ox-texinfo.el (org-texinfo-link): Fix @ref{...} handling. Use
third argument as description. Without description, use
one-argument @ref.
-rw-r--r-- | lisp/ox-texinfo.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 895923f..ec97b5a 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -974,16 +974,12 @@ INFO is a plist holding contextual information. See (if desc (format "@uref{file://%s,%s}" destination desc) (format "@uref{file://%s}" destination))) (`headline - (format "@ref{%s,%s}" - (org-texinfo--get-node destination info) - (cond - (desc) - ((org-export-numbered-headline-p destination info) - (mapconcat - #'number-to-string - (org-export-get-headline-number destination info) ".")) - (t (org-export-data - (org-element-property :title destination) info))))) + (let ((node-name (org-texinfo--get-node destination info))) + (if desc + (format "@ref{%s, , %s}" + node-name + (org-texinfo--sanitize-node desc)) + (format "@ref{%s}" node-name)))) (_ (format "@ref{%s,,%s}" (org-texinfo--get-node destination info) |