0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 11:16:27 +00:00

LaTeX export: Avoid infinite loop when environment is not closed

This commit is contained in:
Carsten Dominik 2009-07-02 13:31:28 +02:00
parent de00dfb952
commit b85b2e1f19
2 changed files with 10 additions and 7 deletions

View file

@ -3,6 +3,8 @@
* org-latex.el (org-export-latex-quotation-marks): Fix export of
quotation makrs in parenthesis.
(org-remove-initial-hash): New function.
(org-export-latex-preprocess): Fix bug with infinite loop if
environment is not properly closed.
* org-table.el (org-table-get-remote-range): Find #+TBLNAME also
when indented.

View file

@ -1542,13 +1542,14 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
(goto-char (point-min))
(while (re-search-forward "^[ \t]*\\\\begin{\\([a-zA-Z]+\\*?\\)}" nil t)
(let* ((start (progn (beginning-of-line) (point)))
(end (or (and (re-search-forward
(concat "^[ \t]*\\\\end{"
(regexp-quote (match-string 1))
"}") nil t)
(point-at-eol))
(point-max))))
(add-text-properties start end '(org-protected t))))
(end (and (re-search-forward
(concat "^[ \t]*\\\\end{"
(regexp-quote (match-string 1))
"}") nil t)
(point-at-eol))))
(if end
(add-text-properties start end '(org-protected t))
(goto-char (point-at-eol))))))
;; Preserve math snippets