From 6d406766dfc77b4a82c765eab3c795bb47b0a679 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 23 May 2009 08:13:05 +0200 Subject: [PATCH] LaTeX export: Fix bug when exporting a region Exporting a region to LaTeX did not recognize section header correctly. Fixed now. --- lisp/ChangeLog | 5 +++++ lisp/org-latex.el | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 940091257..57730e276 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-05-23 Carsten Dominik + + * org-latex.el (org-export-latex-first-lines): Fix bug when + exporting a region. + 2009-05-22 Carsten Dominik * org-exp.el (org-export-push-to-kill-ring): Protect using diff --git a/lisp/org-latex.el b/lisp/org-latex.el index fcc9ceb6d..f565b19a8 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -904,10 +904,9 @@ If END is non-nil, it is the end of the region." (save-excursion (goto-char (or beg (point-min))) (let* ((pt (point)) - (end (or end - (if (re-search-forward "^\\*+ " nil t) - (goto-char (match-beginning 0)) - (goto-char (point-max)))))) + (end (if (re-search-forward "^\\*+ " end t) + (goto-char (match-beginning 0)) + (goto-char (point-max))))) (prog1 (org-export-latex-content (org-export-preprocess-string