summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-02-12 16:01:40 +0100
committerBastien Guerry <bzg@altern.org>2011-02-12 16:01:40 +0100
commit3b77c7ed573381a10383dffc500311991bb89a53 (patch)
treec3b573f6224a0fb661e57a81e8c008b159e818df
parent6132405d05a55edc6cf414d81c9cf0788f5aa064 (diff)
downloadorg-mode-3b77c7ed573381a10383dffc500311991bb89a53.tar.gz
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>.
-rw-r--r--lisp/org-latex.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 7b80b98..79375af 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -850,7 +850,7 @@ when PUB-DIR is set, use this as the publishing directory."
"\n\n"))
;; insert lines before the first headline
- (unless skip
+ (unless (or skip (string-match "^\\*" first-lines))
(insert first-lines))
;; export the content of headlines