diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd882a843..ae6b1333d 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2009-08-11 Carsten Dominik + * org.el (org-format-latex): Avoid nested overlays. + * org-latex.el (org-export-latex-listings-langs): Add a few more languages. diff --git a/lisp/org.el b/lisp/org.el index 639da00e1..6a37acd2d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13902,7 +13902,11 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (while (re-search-forward re nil t) (when (and (or (not at) (equal (cdr at) (match-beginning n))) (not (get-text-property (match-beginning n) - 'org-protected))) + 'org-protected)) + (or (not overlays) + (not (eq (get-char-property (match-beginning n) + 'org-overlay-type) + 'org-latex-overlay)))) (setq txt (match-string n) beg (match-beginning n) end (match-end n) cnt (1+ cnt) @@ -13926,7 +13930,13 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." txt movefile opt forbuffer) (if overlays (progn + (mapc (lambda (o) + (if (eq (org-overlay-get o 'org-overlay-type) + 'org-latex-overlay) + (org-delete-overlay o))) + (org-overlays-in beg end)) (setq ov (org-make-overlay beg end)) + (org-overlay-put ov 'org-overlay-type 'org-latex-overlay) (if (featurep 'xemacs) (progn (org-overlay-put ov 'invisible t)