andrea crotti <andrea.crott...@gmail.com> wrote:

> 
> I want to automatically export to html or something else in my pre- 
> commit hook with git, I tried many things but I always get the same 
> error 
> 
> mbpro:rt-simulate andrea$ cat .git/hooks/pre-commit.bak 
> emacs --batch --load=$HOME/.emacs.d/org-mode/org.el --eval "(setq org- 
> export-headline-levels 2)" --visit=README.org --funcall org-export-as- 
> html-batch 
> 
> mbpro:rt-simulate andrea$ sh .git/hooks/pre-commit.bak 
> Cannot open load file: org-macs 
> org-macs is a library which is situated ~/.emacs.d/org-mode which 
> should be automatically in the load path (not using --quiet), so what 
> could be the problem? 
> 

See the following thread in the mail list archive:

    http://thread.gmane.org/gmane.emacs.orgmode/17059

Basically, --batch implies -q, so you have to do any initialization
(including setting the load-path) as part of the invocation.

HTH,
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

Reply via email to