Просмотр исходного кода

Fix problem when publishing the region to LaTeX.

`org-export-latex-first-lines' was rather stupid and would
discard the end of the region with the region was active.
Thanks to Holst Thomas for this bug report.
Bastien Guerry 16 лет назад
Родитель
Сommit
fe4967229a
2 измененных файлов с 12 добавлено и 3 удалено
  1. 8 0
      lisp/ChangeLog
  2. 4 3
      lisp/org-latex.el

+ 8 - 0
lisp/ChangeLog

@@ -1,3 +1,11 @@
+2009-07-16  Bastien Guerry  <bzg@altern.org>
+
+	* org-latex.el (org-export-latex-first-lines): Fix problem with
+	publishing the region.
+
+	* org-exp.el (org-export-format-source-code-or-example): Fix
+	bad line numbering when exporting examples in HTML.
+
 2009-07-08  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-clock.el (org-clock-goto): Find hidden headlines as well.

+ 4 - 3
lisp/org-latex.el

@@ -960,9 +960,10 @@ 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 (point-max)))))
+	   (end (or 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