lanas <[EMAIL PROTECTED]> writes: > I would like to convert an org file to HTML, much like C-c C-e h > would do, automatically from a shell script. So far I've tried > unsuccesfully some permutaions of: > > emacs -batch -l ~/.emacs -eval '(org-export-as-html "./file.org")' > emacs -batch -l ~/.emacs -eval '(org-export-as-html)' ./file.org
The function `org-export-as-html' doesn't take the file as an argument, it has to be called in the buffer where a file has been found. Look at the script for example: #!/bin/bash emacs -batch -eval \ "(progn (load-file \"~/org-mode/org.el\") \ (load-file \"~/elisp/config/org-batch-config.el\") \ (find-file \"~/yourfile.org\") \ (org-export-as-html 3))" I use org-batch-config.el because obviously I don't need to load all my Emacs config for running this script. But I think it's cleaner to define projects with org-publish and then to publish a project like: emacs -batch -eval "(progn (load \"~/org-mode/org.el\") \ (org-publish \"myproject\"))" HTH, -- Bastien _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode