From 676180a5fbdc9ffc9362b640be9d24f2828b8474 Mon Sep 17 00:00:00 2001 From: Jonathan Leech-Pepin Date: Fri, 14 Dec 2012 09:43:27 -0500 Subject: [PATCH] org-e-texinfo.el: Fix link export to account for alternate TOC names * contrib/lisp/org-e-texinfo.el (org-e-texinfo-link): Texinfo uses the menu/TOC names for finding cross-references. Use the menu-title as the link destination. Also ensures link descriptions are used as link titles. --- contrib/lisp/org-e-texinfo.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/org-e-texinfo.el b/contrib/lisp/org-e-texinfo.el index 314aeb69c..d40234e59 100644 --- a/contrib/lisp/org-e-texinfo.el +++ b/contrib/lisp/org-e-texinfo.el @@ -1199,9 +1199,12 @@ INFO is a plist holding contextual information. See (format "@uref{file://%s}" destination))) ;; LINK points to an headline. Use the headline as the NODE target (headline - (format "@ref{%s}" + (format "@ref{%s,%s}" (org-export-data - (org-element-property :title destination) info))) + (or + (org-element-property :texinfo-menu-title destination) + (org-element-property :title destination)) info) + (or desc ""))) (otherwise (let ((path (org-export-solidify-link-text path))) (if (not desc) (format "@ref{%s}" path) @@ -1221,9 +1224,12 @@ INFO is a plist holding contextual information. See (format "@uref{file://%s}" destination))) ;; LINK points to an headline. Use the headline as the NODE target (headline - (format "@ref{%s}" + (format "@ref{%s,%s}" (org-export-data - (org-element-property :title destination) info))) + (or + (org-element-property :texinfo-menu-title destination) + (org-element-property :title destination)) info) + (or desc ""))) (otherwise (let ((path (org-export-solidify-link-text path))) (if (not desc) (format "@ref{%s}" path)