From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: auto export via git hook Date: Thu, 03 Sep 2009 10:04:56 -0400 Message-ID: <29003.1251986696@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjCxO-00029d-PA for emacs-orgmode@gnu.org; Thu, 03 Sep 2009 10:06:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjCxK-00029R-Ct for emacs-orgmode@gnu.org; Thu, 03 Sep 2009 10:06:34 -0400 Received: from [199.232.76.173] (port=43363 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjCxK-00029O-88 for emacs-orgmode@gnu.org; Thu, 03 Sep 2009 10:06:30 -0400 Received: from vms173019pub.verizon.net ([206.46.173.19]:37820) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjCxJ-0003fG-P7 for emacs-orgmode@gnu.org; Thu, 03 Sep 2009 10:06:29 -0400 Received: from gamaville.dokosmarshall.org ([98.110.172.159]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KPE00DMXF45GY96@vms173019.mailsrvcs.net> for emacs-orgmode@gnu.org; Thu, 03 Sep 2009 09:04:58 -0500 (CDT) In-reply-to: Message from andrea crotti of "Thu, 03 Sep 2009 11:26:48 +0200." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: andrea crotti Cc: emacs-orgmode@gnu.org andrea crotti 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