diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c0f9c3e8..2623ffaeb 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-04-25 Carsten Dominik + * org-latex.el (org-export-as-latex): Make sure that the + result buffer is in latex-mode. + * org.el (org-shiftup-final-hook, org-shiftdown-final-hook) (org-shiftleft-final-hook, org-shiftright-final-hook): New hooks. diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 8e3cd7fee..773ec0f4a 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -793,7 +793,9 @@ when PUB-DIR is set, use this as the publishing directory." (replace-match "\n"))) (run-hooks 'org-export-latex-final-hook) - (or to-buffer (save-buffer)) + (if to-buffer + (unless (eq major-mode 'latex-mode) (latex-mode)) + (save-buffer)) (org-export-latex-fix-inputenc) (run-hooks 'org-export-latex-after-save-hook) (goto-char (point-min))