From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Why does org-html.org refuse to export a table of contents when body-only is t? Date: Fri, 14 May 2010 09:15:22 +0200 Message-ID: <62D88016-7DF5-42F4-8FAB-3AF81B541EE4@gmail.com> References: <4BCB4239.5050503@jboecker.de> <87d3xk4yro.wl%dmaus@ictsoc.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=39574 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCp7L-0000oS-18 for emacs-orgmode@gnu.org; Fri, 14 May 2010 03:15:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCp7I-0008Pk-MV for emacs-orgmode@gnu.org; Fri, 14 May 2010 03:15:30 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:33452) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCp7I-0008PZ-FD for emacs-orgmode@gnu.org; Fri, 14 May 2010 03:15:28 -0400 Received: by wwa36 with SMTP id 36so268461wwa.0 for ; Fri, 14 May 2010 00:15:27 -0700 (PDT) In-Reply-To: <87d3xk4yro.wl%dmaus@ictsoc.de> 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: David Maus Cc: Org Mode On Apr 27, 2010, at 6:59 PM, David Maus wrote: > At Tue, 27 Apr 2010 11:55:44 +0200, > Carsten Dominik wrote: >> >> >> On Apr 18, 2010, at 7:32 PM, Jan B=F6cker wrote: >> >>> 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.h= tml >>> >>> 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 =20 >>> when >>> this was programmed, or is there a specific reason? >> >> >> The reason for this behavior is that the most frequent >> application for this seems to me to convert a small >> block to HTML, to paste it somewhere else. >> >> But I have no string reasons to keep it like this. Do we have more >> opinions on this issue? > > Yes, the prospected exporter to atom uses body only to create html > markup for a atom feed entry where it normally makes no sense to > publish a table of contents. Same is true for org-mime and the "Send > html messages with Wanderlust" hack. I think we should keep it the way it is, and Jan, maybe you can just =20 strip the surrounding stuff yourself, using a hook. best wishes - Carsten > > So maybe create a body without toc when body-only is set to t and > create a body with toc when body-only is the symbol 'include-toc. > > HTH > -- David > > --=20 > OpenPGP... 0x99ADB83B5A4478E6 > Jabber.... dmjena@jabber.org > Email..... dmaus@ictsoc.de - Carsten