org-odt.el: Honor "[TABLE-OF-CONTENTS]" directive
commit90beabb7ab797a4e340cb88e65aeb95396fa66cd
authorJambunathan K <kjambunathan@gmail.com>
Fri, 27 Jan 2012 07:20:19 +0000 (27 12:50 +0530)
committerJambunathan K <kjambunathan@gmail.com>
Fri, 27 Jan 2012 07:20:19 +0000 (27 12:50 +0530)
tree9e509b60082aa13b3e5e027ecd0d0d03e13b053a
parent25ddcb9c35784166b6b5f5b9e72c3e8f98cbb1c2
org-odt.el: Honor "[TABLE-OF-CONTENTS]" directive

* lisp/org-odt.el (org-odt-format-preamble): Don't insert TOC here.
Delay it till the end of export.
(org-odt-begin-document-body): Make a note of the default
position of TOC in `org-lparse-dyn-first-heading-pos'.
(org-odt-insert-toc): Insert TOC as directed by
[TABLE-OF-CONTENTS] line or at the default position.
(org-odt-end-export): Call `org-odt-insert-toc'.

Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00974.html
lisp/org-odt.el