From 988e8802a6f8638b8e57d146cd38282169346e0e Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 22 Jun 2017 19:01:23 +0200 Subject: [PATCH] ox-texinfo: Move menu handling from sections to headlines * lisp/ox-texinfo.el (org-texinfo-headline): Move menu handling from sections to headlines. --- lisp/ox-texinfo.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 2836d09a7..5ea4af01b 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -896,7 +896,8 @@ holding contextual information." (t (concat (format "@node %s\n" (org-texinfo--get-node headline info)) (format section-fmt full-text) - contents))))))) + contents "\n" + (org-texinfo-make-menu headline info)))))))) (defun org-texinfo-format-headline-default-function (todo _todo-type priority text tags) @@ -1359,14 +1360,11 @@ contextual information." ;;;; Section -(defun org-texinfo-section (section contents info) +(defun org-texinfo-section (section contents _info) "Transcode a SECTION element from Org to Texinfo. -CONTENTS holds the contents of the section. INFO is a plist -holding contextual information." - (let ((parent (org-export-get-parent-headline section))) - (when parent ;ignore very first section - (org-trim - (concat contents "\n" (org-texinfo-make-menu parent info)))))) +CONTENTS holds the contents of the section." + (and (org-export-get-parent-headline section) ;ignore first section + contents)) ;;;; Special Block