From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Elston Subject: Re: RFC: Consistent Latex (& html) publishing environment Date: Fri, 19 Nov 2010 11:45:19 -0800 Message-ID: <4CE6D3CF.5030507@comcast.net> References: <20101118225057.GB3139@x201> <8439.1290138709@gamaville.dokosmarshall.org> <20101119041046.GD3139@x201> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=57481 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJWtn-0004yq-Ac for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 14:45:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJWtm-0003jI-3I for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 14:45:31 -0500 Received: from qmta05.westchester.pa.mail.comcast.net ([76.96.62.48]:45286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJWtm-0003iy-0a for emacs-orgmode@gnu.org; Fri, 19 Nov 2010 14:45:30 -0500 In-Reply-To: <20101119041046.GD3139@x201> 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: emacs-orgmode@gnu.org On 11/18/2010 8:10 PM, Russell Adams wrote: > On Thu, Nov 18, 2010 at 10:51:49PM -0500, Nick Dokos wrote: >> [This doesn't seem to have made it out to the list for some reason, >> so trying again.] >> >> Russell Adams wrote: >> >>> ... >>> This is great, but pops up an emacs session. If I run emacs in --batch >>> mode, it won't load my init file and so loses some of my export >>> customizations... >>> >> >> You can load your init file explicitly: >> >> emacs --batch --load ... > > Certainly! And yet, should I be depending on my init file while trying > to provide a consistent environment across documents? That's the crux > of the matter. > > Put everything into init files and use it for everything when it seems > to need customization, or make a document completely selfcontained and > somehow sync settings across docs? > > That's why I was asking how other folks accomplish similar tasks. > > Thanks. > Russell, I do something similar. I use SCons instead of make but the idea is the same. I have extracted all my org-specific functionality into a separate .el file that I load on normal startup as a part of my overall _emacs loading. When doing batch processing I have a cut-down version of my _emacs file which sets up only the paths, loads my org-specific .el file and also loads my custom.el file. The command I use is: -batch -l -eval "(progn (find-file \"\") (org-export-as-latex 4))" where the items in <> provide the relevant paths to the indicated files. This guarantees I have the same org-mode setup interactively as well as in batch mode so there are no surprises on generation. Of course, SCons already knows how to build pdf files from latex so it is trivial from there to do the remaining generation... Mark