From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jan_B=F6cker?= Subject: Why does org-html.org refuse to export a table of contents when body-only is t? Date: Sun, 18 Apr 2010 19:32:41 +0200 Message-ID: <4BCB4239.5050503@jboecker.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020405040400000600070502" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3YMb-0004uB-Gi for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 13:32:57 -0400 Received: from [140.186.70.92] (port=33841 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3YMa-0004u3-9s for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 13:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3YMZ-0001Zp-BW for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 13:32:56 -0400 Received: from mail7.worldserver.net ([217.13.200.27]:55101) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3YMX-0001Z2-ML for emacs-orgmode@gnu.org; Sun, 18 Apr 2010 13:32:55 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode This is a multi-part message in MIME format. --------------020405040400000600070502 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, I'd like to add a table of contents to a HTML export with body-only set to t (to feed into jekyll later), but org-html.el automatically disables the TOC when body-only is given. I have used the attached one-line patch without any problems, the (still XHTML strict compliant) result can be seen here: http://www.jboecker.de/2010/04/14/general-reference-filing-with-org-mode.html gitk tells me that the line I have changed was first introduced in Release 4.75, so is this just a use case that was not thought of when this was programmed, or is there a specific reason? Curious, Jan --------------020405040400000600070502 Content-Type: text/plain; name="0001-Allow-including-a-table-of-contents-in-a-body-only-e.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Allow-including-a-table-of-contents-in-a-body-only-e.pa"; filename*1="tch" >From bdd811611e4a3cd637b0bae22e9d574846acddc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= Date: Fri, 16 Apr 2010 10:17:49 +0200 Subject: [PATCH] Allow including a table of contents in a body-only export --- 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 74f3a55..ab1aac2 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -807,7 +807,7 @@ lang=\"%s\" xml:lang=\"%s\"> (if title (insert (format org-export-html-title-format (org-html-expand title)))))) - (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.0.3 --------------020405040400000600070502 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --------------020405040400000600070502--