From 7b7ad516181789c7c8a1f644952ec26f6e596876 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 3 Oct 2008 11:51:42 +0200 Subject: [PATCH] Fix bug with title extraction during export when first line is headline. --- lisp/org-exp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 5ed9831ec..4cfbce339 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -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