contrib/lisp/org-e-texinfo.el: Fix export bugs
commit9e0f48db2f504ebe1d23b94e06810668074f3a25
authorJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
Wed, 22 Aug 2012 15:06:07 +0000 (22 11:06 -0400)
committerJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
Wed, 22 Aug 2012 17:51:46 +0000 (22 13:51 -0400)
treec3bcf051401c4ed7534820c9e28d7a8d424dc5c2
parent841d949d9c59bb165076f0f5890d97214e513528
contrib/lisp/org-e-texinfo.el: Fix export bugs

* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-detailed): Do
  not run if there are no headlines in the file.
(org-e-texinfo-template): Generate menu and detailed menu in initial
let form.  Only insert them if non-empty.
(org-e-texinfo-headline): Ensure that %'s are properly escaped in
@node's to prevent parse errors.
(org-e-texinfo-make-menu): Do not insert "detailed" if menu is empty,
return empty entry instead.

Thanks to Bastien for reporting the failures with headline-less files
and simple "%" in the headline.
contrib/lisp/org-e-texinfo.el