[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Spurious exporting of text before first header

From: Sebastien Vauban
Subject: Re: [O] Spurious exporting of text before first header
Date: Wed, 25 Sep 2013 09:34:52 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (windows-nt)

Hi François,

François Pinard wrote:
> This is an old annoyance of the Org exporter, yet I'm not sure what
> would be its best resolution.
> Whenever I use :export: tags on headers within an Org file, I expect
> only those headers and their contents to be exported (to HTML in my
> case), and almost nothing else, which I then consider private.
> However, if I have text and other contents prior to the first header of
> a file, those contents are indeed exported, while I would prefer not.
> Of course, #+TITLE and some other directives prior to the first header
> should be honored for their effect.  One might surely debate on the best
> way to handle #+INCLUDE directive.
> I wish the above comments might generate either a correction in Org, or
> an advice for me! :-)
> P.S. Some might suggest me that I avoid text prior to the first header.
> Surely, I have hundreds of Org files and for them all, have some
> personal conventions for their format and structure.  For regularity
> reasons, I would much like to continue having private initial text.

If you like text without initial heading in the exported file, but don't mind
adding an heading in the Org buffer, you could add this:

--8<---------------cut here---------------start------------->8---
* Initial text                             :ignoreheading:
--8<---------------cut here---------------end--------------->8---

and get what you want in the exported file.

I thought that the filter to ignore the heading only was already in Org, but a
quick test with the ASCII backend makes me thing it isn't. Anyway, you can find
recent posts on this.

Best regards,

Sebastien Vauban

reply via email to

[Prev in Thread] Current Thread [Next in Thread]