mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 13:46:27 +00:00
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>
|
2009-12-10 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org-list.el (org-previous-item): Exit at the beginning of the
|
* 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
|
the file header and footer. When PUB-DIR is set, use this as the
|
||||||
publishing directory."
|
publishing directory."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(run-hooks 'org-export-first-hook)
|
||||||
(setq-default org-todo-line-regexp org-todo-line-regexp)
|
(setq-default org-todo-line-regexp org-todo-line-regexp)
|
||||||
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
|
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
|
||||||
ext-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
|
top-level sections). When PUB-DIR is set, use this as the
|
||||||
publishing directory."
|
publishing directory."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(run-hooks 'org-export-first-hook)
|
||||||
|
|
||||||
;; Make sure we have a file name when we need it.
|
;; Make sure we have a file name when we need it.
|
||||||
(when (and (not (or to-buffer body-only))
|
(when (and (not (or to-buffer body-only))
|
||||||
(not buffer-file-name))
|
(not buffer-file-name))
|
||||||
|
|
|
@ -357,6 +357,10 @@ drawer names to export."
|
||||||
(repeat :tag "Selected drawers"
|
(repeat :tag "Selected drawers"
|
||||||
(string :tag "Drawer name"))))
|
(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
|
(defvar org-export-preprocess-hook nil
|
||||||
"Hook for preprocessing an export buffer.
|
"Hook for preprocessing an export buffer.
|
||||||
Pretty much the first thing when exporting is running this hook.")
|
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
|
<body>...</body>, without even the body tags themselves. When
|
||||||
PUB-DIR is set, use this as the publishing directory."
|
PUB-DIR is set, use this as the publishing directory."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(run-hooks 'org-export-first-hook)
|
||||||
|
|
||||||
;; Make sure we have a file name when we need it.
|
;; Make sure we have a file name when we need it.
|
||||||
(when (and (not (or to-buffer body-only))
|
(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.
|
without even the \begin{document} and \end{document} commands.
|
||||||
when PUB-DIR is set, use this as the publishing directory."
|
when PUB-DIR is set, use this as the publishing directory."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(run-hooks 'org-export-first-hook)
|
||||||
|
|
||||||
;; Make sure we have a file name when we need it.
|
;; Make sure we have a file name when we need it.
|
||||||
(when (and (not (or to-buffer body-only))
|
(when (and (not (or to-buffer body-only))
|
||||||
(not buffer-file-name))
|
(not buffer-file-name))
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
"Export the org buffer as XOXO.
|
"Export the org buffer as XOXO.
|
||||||
The XOXO buffer is named *xoxo-<source buffer name>*"
|
The XOXO buffer is named *xoxo-<source buffer name>*"
|
||||||
(interactive (list (current-buffer)))
|
(interactive (list (current-buffer)))
|
||||||
|
(run-hooks 'org-export-first-hook)
|
||||||
;; A quickie abstraction
|
;; A quickie abstraction
|
||||||
|
|
||||||
;; Output everything as XOXO
|
;; Output everything as XOXO
|
||||||
|
|
Loading…
Reference in a new issue