emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Herbert Sitz <hsitz@nwlink.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: calling to Emacs server to export to PDF
Date: Tue, 07 Dec 2010 14:26:46 -0500	[thread overview]
Message-ID: <13338.1291750006@gamaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Herbert Sitz <hsitz@nwlink.com> of "Tue, 07 Dec 2010 18:39:51 GMT." <loom.20101207T193033-429@post.gmane.org>

[Resending to the list: I got bitten by my old server verification nemesis.
 Hope this makes it. Apologies to Herb for the duplicates.]

Herbert Sitz <hsitz@nwlink.com> wrote:

> I'm trying to call a function in an Emacs server to export a file to PDF usin
g
> the following command:
> 
> "c:\program files (x86)\emacs\emacs\bin\emacs.exe" -batch --visit=[myfile]
> --funcall org-export-as-pdf
> 
> It works okay but it doesn't seem to use the default latex class that I've
> defined in my .emacs.  I can alter the LaTeX output by embedding #+LATEX_HEAD
> lines in my file, but those come after the \documentclass command and all the
> other default preamble lines Emacs is inserting.
> 
> Printing from the same Emacs instance directly does seem to use the .emacs
> configuration for LaTeX-related variables.
> 
> So I have a couple of questions.
> 
> (1)  Is behavior I'm seeing expected?  That is, when I call org-export-as-pdf
> remotely it ignores settings in the .emacs file?
> 

Yes, --batch implies -q, so you have to load your .emacs explicitly (or perhaps
strip it down to its essentials and create a minimal .emacs for such a use).

See appendix C.2 of the emacs manual:

  (info "(emacs)Initial Options")


> (2)  Is best workaround to just alter the default LaTeX class definitions in
> org-latex.el?
> 

Probably not: try

  emacs --batch --load $HOME/minimal.emacs --visit <file> --funcall org-export-as-pdf

(well, translated into whatever Windows needs).

HTH,
Nick

  reply	other threads:[~2010-12-07 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 18:39 calling to Emacs server to export to PDF Herbert Sitz
2010-12-07 19:26 ` Nick Dokos [this message]
2010-12-07 19:35   ` Herbert Sitz

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=13338.1291750006@gamaville.americas.hpqcorp.net \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hsitz@nwlink.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).