Browse Source

LaTeX export: New hook that runs after saving the buffer

Carsten Dominik 15 years ago
parent
commit
3332383db7
2 changed files with 9 additions and 0 deletions
  1. 5 0
      lisp/ChangeLog
  2. 4 0
      lisp/org-latex.el

+ 5 - 0
lisp/ChangeLog

@@ -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

+ 4 - 0
lisp/org-latex.el

@@ -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"))