org-latex.el: fix bug when using #+INCLUDE before the first heading.
commit3b77c7ed573381a10383dffc500311991bb89a53
authorBastien Guerry <bzg@altern.org>
Sat, 12 Feb 2011 15:01:40 +0000 (12 16:01 +0100)
committerBastien Guerry <bzg@altern.org>
Sat, 12 Feb 2011 15:01:40 +0000 (12 16:01 +0100)
treec3b573f6224a0fb661e57a81e8c008b159e818df
parent6132405d05a55edc6cf414d81c9cf0788f5aa064
org-latex.el: fix bug when using #+INCLUDE before the first heading.

The LaTeX looks for strings to export before the first headline.  Such
strings are defined as "before the first heading", so they normally never
match a heading regexp.  However, #+INCLUDE can insert lines before the
first heading matching a heading regexp, causing these lines to appear
twice: as first lines and as normal headings.

The fix is to never include first lines when they match a heading regexp.

This was reported by Rasmus <rasmus.pank@gmail.com>.
lisp/org-latex.el