[Orgmode] auto export via git hook

2009-09-03 Thread andrea crotti

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? 

Thanks again



___
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


Re: [Orgmode] auto export via git hook

2009-09-03 Thread Nick Dokos
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