|
From: | Carsten Dominik |
Subject: | Re: [Orgmode] 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 |
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öcker 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.html gitk tells me that the line I have changed was first introduced inRelease 4.75, so is this just a use case that was not thought of whenthis 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 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 -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... address@hidden Email..... address@hidden
- Carsten
[Prev in Thread] | Current Thread | [Next in Thread] |