org-latex.el: bugfix about exporting first lines with no heading.

org-export-latex-first-lines was confused when there was no
heading after the first headlines.  This patch fixes this.
This commit is contained in:
Bastien Guerry 2009-08-30 19:10:06 +08:00
parent 6bddc14c20
commit 3bc997fe8f
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2009-08-30 Bastien Guerry <bzg@altern.org>
* org-latex.el (org-export-latex-first-lines): Bugfix.
2009-08-29 Carsten Dominik <carsten.dominik@gmail.com>
* org-clock.el (org-clock-modify-effort-estimate): Emit message

View File

@ -1003,10 +1003,11 @@ If BEG is non-nil, it is the beginning of the region.
If END is non-nil, it is the end of the region."
(save-excursion
(goto-char (or beg (point-min)))
(let* ((pt (point))
(end (if (re-search-forward "^\\*+ " end t)
(goto-char (match-beginning 0))
(goto-char end))))
(let* ((pt (point)))
(or end
(and (re-search-forward "^\\*+ " end t)
(setq end (match-beginning 0)))
(setq end (point-max)))
(prog1
(org-export-latex-content
(org-export-preprocess-string