emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mark Elston <m_elston@comcast.net>
To: emacs-orgmode@gnu.org
Subject: Re: RFC: Consistent Latex (& html) publishing environment
Date: Fri, 19 Nov 2010 11:45:19 -0800	[thread overview]
Message-ID: <4CE6D3CF.5030507@comcast.net> (raw)
In-Reply-To: <20101119041046.GD3139@x201>

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<RLAdams@AdamsInfoServ.Com>  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<init-file>  ...
>
> 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:

<emacs> -batch -l <org_el> -eval
     "(progn (find-file \"<project_org_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

      reply	other threads:[~2010-11-19 19:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 22:50 Russell Adams
2010-11-19  3:51 ` Nick Dokos
2010-11-19  4:10   ` Russell Adams
2010-11-19 19:45     ` Mark Elston [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE6D3CF.5030507@comcast.net \
    --to=m_elston@comcast.net \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: RFC: Consistent Latex (& html) publishing environment' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this 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).