I have an org-mode document that I am exporting to reveal.js via org-reveal. Currently, I do a (require 'ox-reveal) and then I can do C-e R R from within my org-mode document. I am wondering how I can script this so I can do this from within bash. I currently have a bash script for a related project that does uses batch mode as follows,

emacs my-doc.org --batch -f org-html-export-to-html --kill

I am wondering how to adapt this to org-reveal. Part of the problem is making sure (require 'ox-reveal) happens in batch mode.

Looking forward to any pointers here.



With external config file,

emacs --batch --no-init-file --load config.el --find-file to-export.org --funcall org-export-function

Or without your "normal" init.el,

emacs --batch --eval "(require 'ox-backend)" --find-file to-export.org --funcall org-export-function
  • Thank you rasmus. I really appreciate your answer. One final point of confusion, for the org-reveal exporter, I currently use 'C-c e R R` to call the exporter. There must be a function I can call that does the export directly, but I am not sure what it is. Do you happen to know?
    – stevejb
    Aug 3 '16 at 13:48
  • 1
    I think it is org-reveal-export-to-html, as seen in the bottom of github.com/yjwen/org-reveal/blob/master/ox-reveal.el
    – stevejb
    Aug 3 '16 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.