From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Davis Subject: Re: export org file to html from command-line Date: Thu, 7 Apr 2011 07:44:49 -0400 Message-ID: References: <81oc4iiqzp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=44116 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7nds-0003rV-Fl for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 07:44:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7ndr-0001GA-HL for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 07:44:52 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:44331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7ndr-0001G5-Dr for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 07:44:51 -0400 Received: by iyf13 with SMTP id 13so3206997iyf.0 for ; Thu, 07 Apr 2011 04:44:50 -0700 (PDT) In-Reply-To: <81oc4iiqzp.fsf@gmail.com> 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: Jambunathan K Cc: "emacs-orgmode@gnu.org" On Thu, Apr 7, 2011 at 1:12 AM, Jambunathan K wrot= e: > Sean Davis writes: > >> I would like to have a way to export a file to html from the >> command-line > > ,----[ C-h f org-export-as-html-batch RET ] > | org-export-as-html-batch is a compiled Lisp function in `org-html.el'. > | > | (org-export-as-html-batch) > | > | Call the function `org-export-as-html'. > | This function can be used in batch processing as: > | emacs =C2=A0 --batch > | =C2=A0 =C2=A0 =C2=A0 =C2=A0 --load=3D$HOME/lib/emacs/org.el > | =C2=A0 =C2=A0 =C2=A0 =C2=A0 --eval "(setq org-export-headline-levels 2)= " > | =C2=A0 =C2=A0 =C2=A0 =C2=A0 --visit=3DMyFile --funcall org-export-as-ht= ml-batch > | > | [back] > `---- Here what I ended up doing: /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -nw --batch --eval "(setq aquamacs-version 2)" --visit=3Dbiowulf-2011.org --funcall=3Dorg-export-as-html It also works fine with other exports. Both "org-export-as-html" and "org-export-as-pdf" work just fine. Finally, I need to sort out the details, but aquamacs needed to have aquamacs-version set in order to run this in batch mode (hence, the (setq aquamacs-version 2) eval). Thanks for the pointer to get things started. Sean