Fix bug with title extraction during export when first line is headline.

This commit is contained in:
Carsten Dominik 2008-10-03 11:51:42 +02:00
parent e9a39cf1cd
commit 7b7ad51618

View file

@ -1878,7 +1878,9 @@ can work correctly."
(let ((inhibit-read-only t))
(save-excursion
(goto-char (point-min))
(let ((end (save-excursion (outline-next-heading) (point))))
(let ((end (if (looking-at org-outline-regexp)
(point)
(save-excursion (outline-next-heading) (point)))))
(when (re-search-forward "^[ \t]*[^|# \t\r\n].*\n" end t)
;; Mark the line so that it will not be exported as normal text.
(org-unmodified