diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-02-18 10:11:10 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-02-18 10:11:10 +0100 |
commit | 5fa426bfe2572630938c96a6499d550a61dc0534 (patch) | |
tree | 9d7da9798b5f18b08214825ff0a125df7a5a679f | |
parent | 93ec2c7a5034944f5f6c77be6f37c49b4a697b72 (diff) | |
download | org-mode-5fa426bfe2572630938c96a6499d550a61dc0534.tar.gz |
org-export: Allow to have HTML back-end output in a temporary buffer
* contrib/lisp/org-export.el (org-export-dispatch,
org-export-dispatch-ui): Add a key to export to a temporary buffer.
-rw-r--r-- | contrib/lisp/org-export.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index 1602abb..4aa9c40 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -94,6 +94,7 @@ (require 'org-element) ;; Require major back-ends and publishing tools (require 'org-e-ascii "../../EXPERIMENTAL/org-e-ascii.el") +(require 'org-e-html "../../EXPERIMENTAL/org-e-html.el") (require 'org-e-latex "../../EXPERIMENTAL/org-e-latex.el") (require 'org-e-publish "../../EXPERIMENTAL/org-e-publish.el") @@ -3211,14 +3212,20 @@ Return an error if key pressed has no associated command." (?d (org-open-file (org-e-latex-export-to-pdf (memq 'subtree optns) (memq 'visible optns) (memq 'body optns)))) - ;; Export with `e-html' back-end. + (?H + (let ((outbuf + (org-export-to-buffer + 'e-html "*Org E-HTML Export*" + (memq 'subtree optns) (memq 'visible optns) (memq 'body optns)))) + (with-current-buffer outbuf (nxhtml-mode)) + (when org-export-show-temporary-export-buffer + (switch-to-buffer-other-window outbuf)))) (?h (org-e-html-export-to-html (memq 'subtree optns) (memq 'visible optns) (memq 'body optns))) (?b (org-open-file - (org-e-html-export-to-html - (memq 'subtree optns) (memq 'visible optns) (memq 'body optns)))) - + (org-e-html-export-to-html + (memq 'subtree optns) (memq 'visible optns) (memq 'body optns)))) ;; Publishing facilities (?F (org-e-publish-current-file (memq 'force optns))) (?P (org-e-publish-current-project (memq 'force optns))) @@ -3264,6 +3271,7 @@ final interactive export options as CDR." --------------------- HTML Export ----------------------- \[h] to HTML file [b] ... and open it +\[H] to temporary buffer ------------------------- Publish ------------------------- \[F] current file [P] current project |