LaTeX export: New hook that runs after saving the buffer

This commit is contained in:
Carsten Dominik 2010-01-06 08:50:47 +01:00
parent 70f28cbfc8
commit 3332383db7
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-01-06 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-after-save-hook): New hook.
(org-export-as-latex): Run the new hook.
2010-01-05 Carsten Dominik <carsten.dominik@gmail.com>
* org-beamer.el (org-beamer-environments-default): Add the note

View File

@ -447,6 +447,9 @@ have been determined from the environment.")
(defvar org-export-latex-final-hook nil
"Hook run in the finalized LaTeX buffer.")
(defvar org-export-latex-after-save-hook nil
"Hook run in the finalized LaTeX buffer, after it has been saved.")
;;; Autoload functions:
;;;###autoload
@ -743,6 +746,7 @@ when PUB-DIR is set, use this as the publishing directory."
(run-hooks 'org-export-latex-final-hook)
(or to-buffer (save-buffer))
(run-hooks 'org-export-latex-after-save-hook)
(goto-char (point-min))
(or (org-export-push-to-kill-ring "LaTeX")
(message "Exporting to LaTeX...done"))