org-odt.el: Honor "[TABLE-OF-CONTENTS]" directive
commit2ac428a21d544b35831265cad0df9a1372b268f2
authorJambunathan K <kjambunathan@gmail.com>
Fri, 27 Jan 2012 07:20:19 +0000 (27 12:50 +0530)
committerEric Schulte <eric.schulte@gmx.com>
Sun, 19 Feb 2012 15:04:31 +0000 (19 08:04 -0700)
tree2b20be02ebe7e540d725d64e59a90c1723b86a93
parent8c16d854769b6ebf614f14795a1fe11111e88fad
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