Nick Dokos <nicholas.do...@hp.com> wrote: > Stephen Tucker <brown_...@yahoo.com> wrote: > > > Hi Nick, > > > thanks for the response! Actually in the code that I had pasted, the > > emacs --batch call is all on one line (so no need to escape newlines > > there). I tried your code with both > > > orglib=/Applications/Emacs.app/Contents/Resources/lisp/org > > and > > orglib=$HOME/elisp/org-mode/lisp > > You need the former - the latter is where I keep my org.el[c] > > > but got > > Cannot open load file: org-macs > > in both cases I also added a line, > > --eval "(load > > \"/Applications/Emacs.app/Contents/Resources/lisp/org/org.elc\")" \ > > to replace the --load option but same deal. > > I do in fact have org-macs in my 'orglib' directories so I tried > > loading them explicitly (with multiple --load specifications), but it > > still doesn't work (Still "Cannot open load file" pointing to some org > > file or subst-ksc, depending on how many or in what order org .el > > files are loaded). Any more ideas? > > > > The problem is probably that --batch implies -q, so .emacs is *not* > loaded and you don't get your load-path customizations. Maybe > something like this will work (the quoting gets hairy, so pay > close attention to all the details): > > #! /bin/bash > > orglib=/Applications/Emacs.app/Contents/Resources/lisp/org > emacs --batch \ > --eval "(add-to-list 'load-path \"$orglib\")" \ # need a backslash here. > --load=$orglib/org.elc \ > --eval "(setq org-export-headline-levels 2)" \ > --visit=$1 --funcall org-export-as-latex-batch > >
... and I just noticed that I missed a backslash on the added line. Sorry about that. Nick _______________________________________________ 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