New hook org-export-first-hook
This commit is contained in:
parent
7dc0f4e4be
commit
2df4c1ca04
|
@ -1,3 +1,19 @@
|
|||
2009-12-11 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-xoxo.el (org-export-as-xoxo): Run `org-export-first-hook'.
|
||||
|
||||
* org-latex.el (org-export-region-as-latex): Run
|
||||
`org-export-first-hook'.
|
||||
|
||||
* org-html.el (org-export-as-html): Run `org-export-first-hook'.
|
||||
|
||||
* org-docbook.el (org-export-as-docbook): Run
|
||||
`org-export-first-hook'.
|
||||
|
||||
* org-ascii.el (org-export-as-ascii): Run `org-export-first-hook'.
|
||||
|
||||
* org-exp.el (org-export-first-hook): New hook.
|
||||
|
||||
2009-12-10 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-list.el (org-previous-item): Exit at the beginning of the
|
||||
|
|
|
@ -156,6 +156,7 @@ resulting ASCII as a string. When BODY-ONLY is set, don't produce
|
|||
the file header and footer. When PUB-DIR is set, use this as the
|
||||
publishing directory."
|
||||
(interactive "P")
|
||||
(run-hooks 'org-export-first-hook)
|
||||
(setq-default org-todo-line-regexp org-todo-line-regexp)
|
||||
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
|
||||
ext-plist
|
||||
|
|
|
@ -384,6 +384,8 @@ header and footer, simply return the content of the document (all
|
|||
top-level sections). When PUB-DIR is set, use this as the
|
||||
publishing directory."
|
||||
(interactive "P")
|
||||
(run-hooks 'org-export-first-hook)
|
||||
|
||||
;; Make sure we have a file name when we need it.
|
||||
(when (and (not (or to-buffer body-only))
|
||||
(not buffer-file-name))
|
||||
|
|
|
@ -357,6 +357,10 @@ drawer names to export."
|
|||
(repeat :tag "Selected drawers"
|
||||
(string :tag "Drawer name"))))
|
||||
|
||||
(defvar org-export-first-hook nil
|
||||
"Hook called as the first thing in each exporter.
|
||||
Good for general initialization")
|
||||
|
||||
(defvar org-export-preprocess-hook nil
|
||||
"Hook for preprocessing an export buffer.
|
||||
Pretty much the first thing when exporting is running this hook.")
|
||||
|
|
|
@ -539,6 +539,7 @@ the file header and footer, simply return the content of
|
|||
<body>...</body>, without even the body tags themselves. When
|
||||
PUB-DIR is set, use this as the publishing directory."
|
||||
(interactive "P")
|
||||
(run-hooks 'org-export-first-hook)
|
||||
|
||||
;; Make sure we have a file name when we need it.
|
||||
(when (and (not (or to-buffer body-only))
|
||||
|
|
|
@ -521,6 +521,8 @@ simply return the content of \begin{document}...\end{document},
|
|||
without even the \begin{document} and \end{document} commands.
|
||||
when PUB-DIR is set, use this as the publishing directory."
|
||||
(interactive "P")
|
||||
(run-hooks 'org-export-first-hook)
|
||||
|
||||
;; Make sure we have a file name when we need it.
|
||||
(when (and (not (or to-buffer body-only))
|
||||
(not buffer-file-name))
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
"Export the org buffer as XOXO.
|
||||
The XOXO buffer is named *xoxo-<source buffer name>*"
|
||||
(interactive (list (current-buffer)))
|
||||
(run-hooks 'org-export-first-hook)
|
||||
;; A quickie abstraction
|
||||
|
||||
;; Output everything as XOXO
|
||||
|
|
Loading…
Reference in New Issue