From 6ac0be17e90faeda27ec2f45f39361c7c454a53f Mon Sep 17 00:00:00 2001 From: Sliim Date: Sun, 10 Nov 2013 23:51:25 +0100 Subject: [PATCH] Add menu entry to export and browse HTML file. Add function org-reveal-export-to-html-and-browse that call org-reveal-export-to-html and browse generated file. Add menu entry `C-c R B` to export and browse HTML file. --- ox-reveal.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ox-reveal.el b/ox-reveal.el index c58280b..eccafc6 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -36,7 +36,8 @@ :menu-entry '(?R "Export to reveal.js HTML Presentation" - ((?R "To file" org-reveal-export-to-html))) + ((?R "To file" org-reveal-export-to-html) + (?B "To file and Browse" org-reveal-export-to-html-and-browse))) :options-alist '((:reveal-control nil "reveal_control" org-reveal-control t) @@ -705,6 +706,12 @@ info is a plist holding export options." (org-export-to-file 'reveal file subtreep visible-only body-only ext-plist))) +(defun org-reveal-export-to-html-and-browse + (&optional async subtreep visible-only body-only ext-plist) + "Export current buffer to a reveal.js and browse HTML file." + (interactive) + (browse-url-of-file (org-reveal-export-to-html async subtreep visible-only body-only ext-plist))) + (provide 'ox-reveal) ;;; ox-reveal.el ends here