From 9f91361e8c8cd7047acf0260bff2ae81e72fcc93 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 31 Mar 2012 16:35:04 -0600 Subject: [PATCH] Bring the meaning of body-only in org-export-as-html closer to docs The docstring for org-export-as-html says "When BODY-ONLY is set, don't produce the file header and footer, simply return the content of ..., without even the body tags themselves." However, it currently also inhibits the generation of the table of contents, regardless if one is asked for by the user in the #+OPTIONS line of the file. This patch fixes that (i.e. allows for toc generation if it is requested). --- lisp/org-html.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 2de2ea9..cb785f3 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1402,7 +1402,7 @@ PUB-DIR is set, use this as the publishing directory." "\n

" title "

\n")) ;; insert body - (if (and org-export-with-toc (not body-only)) + (if org-export-with-toc (progn (push (format "%s\n" org-export-html-toplevel-hlevel -- 1.7.9