diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-25 09:13:42 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-25 09:13:42 +0200 |
commit | 18c5609ea0bcf478cef1cbb697fa5081ee68c35b (patch) | |
tree | 9f4cf8b224ecf2061b9c08a9c48591e35a95f675 | |
parent | de5d40ba98dc43810970b2fed7121475aad812a9 (diff) | |
download | org-mode-18c5609ea0bcf478cef1cbb697fa5081ee68c35b.tar.gz |
Make sure result buffer of LaTeX export is in LaTeX mode
Report and patch from Dan Davison
-rwxr-xr-x | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/org-latex.el | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c0f9c3..2623ffa 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-04-25 Carsten Dominik <carsten.dominik@gmail.com> + * 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 8e3cd7f..773ec0f 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)) |