[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] export (as latex) a large number of org files in a directo

From: Nick Dokos
Subject: Re: [Orgmode] export (as latex) a large number of org files in a directory
Date: Sun, 30 Aug 2009 22:27:00 -0400

Stephen Tucker <address@hidden> wrote:

> Hi Nick, 

> thanks for the response! Actually in the code that I had pasted, the
> emacs --batch call is all on one line (so no need to escape newlines
> there). I tried your code with both

> orglib=/Applications/Emacs.app/Contents/Resources/lisp/org
> and
> orglib=$HOME/elisp/org-mode/lisp

You need the former - the latter is where I keep my org.el[c]

> but got 
> Cannot open load file: org-macs
> in both cases I also added a line, 
> --eval "(load 
> \"/Applications/Emacs.app/Contents/Resources/lisp/org/org.elc\")" \
> to replace the --load option but same deal.
> I do in fact have org-macs in my 'orglib' directories so I tried
> loading them explicitly (with multiple --load specifications), but it
> still doesn't work (Still "Cannot open load file" pointing to some org
> file or subst-ksc, depending on how many or in what order org .el
> files are loaded). Any more ideas?

The problem is probably that --batch implies -q, so .emacs is *not*
loaded and you don't get your load-path customizations. Maybe
something like this will work (the quoting gets hairy, so pay
close attention to all the details):

--8<---------------cut here---------------start------------->8---
#! /bin/bash

emacs   --batch \
         --eval "(add-to-list 'load-path \"$orglib\")"
         --load=$orglib/org.elc \
         --eval "(setq org-export-headline-levels 2)" \
         --visit=$1 --funcall org-export-as-latex-batch
--8<---------------cut here---------------end--------------->8---


reply via email to

[Prev in Thread] Current Thread [Next in Thread]