From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Gray Subject: Re: [patch] Re: meaning of body-only in org-export-as-html Date: Tue, 03 Apr 2012 10:40:50 -0600 Message-ID: <87vclgwyy5.fsf@gmail.com> References: <87k42k18i5.fsf@gmail.com> <87haxgheoe.fsf@gmail.com> <87obrcie1l.fsf@gmail.com> <87aa2u4kvm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF6nG-0002fw-Rk for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 12:41:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF6n0-0005Ot-Of for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 12:41:16 -0400 In-Reply-To: <87aa2u4kvm.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Bastien 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Export-Allow-for-TOC-generation-if-body-only-is-set.patch >From 3ae7de6bd5b91ce18ed38dfce46466d6dd3a64b7 Mon Sep 17 00:00:00 2001 From: Chris Gray 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 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

" 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 --=-=-=--