Dear Colin, we have implemented a preview service at our institute which converts org-files for people who do not want to or can not run org-mode locally (people can hand in org-files which will be converted to HTML as personal web pages for institute members, http://www.nf.mpg.de/cv-howto/cv-en.html). It runs on a Unix box and the core - the part which is called from a web frontend and converts an org-file (and associated files in our case) looks like this: #!/bin/sh /opt/emacs23.sol/bin/emacs -Q --batch --eval "(add-to-list 'load-path \"/opt/org-7.01/lisp/\")" -load "/var/opt/webstack/apache2/2.2/htdocs/org/emacs- setup.el" --visit="$1" --eval "(set-buffer-file-coding-system 'utf-8)" --funcall my-org-publish-current The main point is, like Erik pointed out, that we define the path to the org-mode lisp files and in emacs-setup.el then define some functions for publishing org-files in a project-oriented fashion - that part could be simpler in your case. Warm regards, Stefan On 01.10.2010, at 09:49, Colin Grey wrote: > Hello, > > I'm trying to write a shell script that will automatically change a bunch of my org-mode files into HTML files. But am running into some problems. The structure, as best I understand it, should like something like this: > > emacs -batch -eval '(progn (find-file "test.org.txt") (org-export-as-html "test.html"))' > > However, when I run that, it gives the output: > > Loading 00fink-vars... > Exporting... > Exporting... > Exporting... > Wrong type argument: stringp, nil > > > Oddly, I've noticed that if I don't use my custom extension (.org.txt) but just use .org like so: > > emacs -batch -eval '(progn (find-file "test.org") (org-export-as-html "test.html"))' > > It will run, but will always spit out a blank HTML file, no matter the contents of test.org > > Thank you in advance for any help, > > Colin Grey > > www.CGPGrey.com > www.ProductivePorcupine.com > -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de