Bastien <b...@gnu.org> writes:
> I'm ready to apply this patch, but can you add a proper Emacs 
> ChangeLog?

Updated patch attached.

By the way, I am in the "Processing" section in the list of people who
have signed papers on Worg.  However, I received confirmation that my
papers went through a long time ago.  Should I correct Worg on this?

Cheers,
Chris

>From 3ae7de6bd5b91ce18ed38dfce46466d6dd3a64b7 Mon Sep 17 00:00:00 2001
From: Chris Gray <chrismg...@gmail.com>
Date: Tue, 3 Apr 2012 10:32:56 -0600
Subject: [PATCH] Export: Allow for TOC generation if body-only is set

* lisp/org-html.el (org-export-as-html): Remove the check for
body-only in the code for generating tables of contents.

The docstring for org-export-as-html states that the body-only flag
removes everything outside the <body></body> tags (inclusive).  Since
the table of contents is inside these tags, it should be exported when
requested even if the body-only flag is set.
---
 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 be2124b..385d8ec 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1414,7 +1414,7 @@ PUB-DIR is set, use this as the publishing directory."
 		"\n<h1 class=\"title\">" title "</h1>\n"))
 
       ;; insert body
-      (if (and org-export-with-toc (not body-only))
+      (if org-export-with-toc
 	  (progn
 	    (push (format "<h%d>%s</h%d>\n"
 			  org-export-html-toplevel-hlevel
-- 
1.7.9

Reply via email to