Ver código fonte

Amend Bastiens fix in 3bc997fe8f4c8c57deaa451947a733a28500fb8e

This fix did create a new problem with exporting selected subtrees.
I hope it works now.
Carsten Dominik 15 anos atrás
pai
commit
317ea8bf9d
2 arquivos alterados com 7 adições e 5 exclusões
  1. 3 0
      lisp/ChangeLog
  2. 4 5
      lisp/org-latex.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-09-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-latex-first-lines): Fix problem with
+	LaTeX export of first line and selected subtree.
+
 	* org.el (org-shifttab): Interpret arg differently when using only
 	odd levels.
 

+ 4 - 5
lisp/org-latex.el

@@ -1003,11 +1003,10 @@ If BEG is non-nil, it is the beginning of the region.
 If END is non-nil, it is the end of the region."
   (save-excursion
     (goto-char (or beg (point-min)))
-    (let* ((pt (point)))
-      (or end
-	  (and (re-search-forward "^\\*+ " end t)
-	       (setq end (match-beginning 0)))
-	  (setq end (point-max)))
+    (let* ((pt (point))
+	   (end (if (re-search-forward "^\\*+ " end t)
+		    (goto-char (match-beginning 0))
+		  (goto-char (or end (point-max))))))
       (prog1
 	  (org-export-latex-content
 	   (org-export-preprocess-string