Jelajahi Sumber

LaTeX export: Fix bug when exporting a region

Exporting a region to LaTeX did not recognize section header
correctly.  Fixed now.
Carsten Dominik 16 tahun lalu
induk
melakukan
6d406766df
2 mengubah file dengan 8 tambahan dan 4 penghapusan
  1. 5 0
      lisp/ChangeLog
  2. 3 4
      lisp/org-latex.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-05-23  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-latex.el (org-export-latex-first-lines): Fix bug when
+	exporting a region.
+
 2009-05-22  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-exp.el (org-export-push-to-kill-ring): Protect using

+ 3 - 4
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