From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Spurious exporting of text before first header Date: Wed, 25 Sep 2013 09:34:52 +0200 Message-ID: <86mwn12w2r.fsf@somewhere.org> References: <86mwn1a6xn.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Fran=C3=A7ois, Fran=C3=A7ois 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 mi= nd 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, bu= t a quick test with the ASCII backend makes me thing it isn't. Anyway, you can = find recent posts on this. Best regards, Seb --=20 Sebastien Vauban