소스 검색

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 년 전
부모
커밋
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>
 2009-07-08  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* org-clock.el (org-clock-goto): Find hidden headlines as well.
 	* 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
   (save-excursion
     (goto-char (or beg (point-min)))
     (goto-char (or beg (point-min)))
     (let* ((pt (point))
     (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
       (prog1
 	  (org-export-latex-content
 	  (org-export-latex-content
 	   (org-export-preprocess-string
 	   (org-export-preprocess-string