* auto export via git hook
@ 2009-09-03 9:26 andrea crotti
2009-09-03 14:04 ` Nick Dokos
0 siblings, 1 reply; 4+ messages in thread
From: andrea crotti @ 2009-09-03 9:26 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: auto export via git hook
2009-09-03 9:26 auto export via git hook andrea crotti
@ 2009-09-03 14:04 ` Nick Dokos
2009-09-04 11:28 ` andrea crotti
0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2009-09-03 14:04 UTC (permalink / raw)
To: andrea crotti; +Cc: emacs-orgmode
andrea crotti <andrea.crotti.0@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: auto export via git hook
2009-09-03 14:04 ` Nick Dokos
@ 2009-09-04 11:28 ` andrea crotti
2009-09-04 11:53 ` Nick Dokos
0 siblings, 1 reply; 4+ messages in thread
From: andrea crotti @ 2009-09-04 11:28 UTC (permalink / raw)
To: emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> andrea crotti <andrea.crotti.0@gmail.com> wrote:
> 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.
>
Ok thanks I understood the problem but I still didn't solve it, now with
this
emacs --batch \
--load=$HOME/.emacs.d/init.el \
--load=$HOME/.emacs.d/org-mode/org.elc \
--eval "(setq org-export-headline-levels 2)" \
--visit=README.org --funcall org-export-as-html-batch
I get:
.git/hooks/pre-commit.bak
Invalid function: charset-iso-final-char
which is "charset-iso-final-char is a compiled Lisp function in
`mule.el'."
But I also suspect that init.el is not loaded, it's too fast...
any help?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: auto export via git hook
2009-09-04 11:28 ` andrea crotti
@ 2009-09-04 11:53 ` Nick Dokos
0 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2009-09-04 11:53 UTC (permalink / raw)
To: andrea crotti; +Cc: emacs-orgmode
andrea crotti <andrea.crotti.0@gmail.com> wrote:
>
> But I also suspect that init.el is not loaded, it's too fast...
> any help?
>
Add
(message "init.el loaded")
at the end of init.el - it should appear on stdout.
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-04 11:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03 9:26 auto export via git hook andrea crotti
2009-09-03 14:04 ` Nick Dokos
2009-09-04 11:28 ` andrea crotti
2009-09-04 11:53 ` Nick Dokos
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).