emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Myles English <mylesenglish@gmail.com>
To: Garrido Xavier <garrido@lal.in2p3.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Makefile to export to html/pdf using emacsclient
Date: Tue, 08 Oct 2013 22:42:56 +0100	[thread overview]
Message-ID: <87ob6z782n.fsf@gmail.com> (raw)
In-Reply-To: <5254554A.8010806@lal.in2p3.fr>


Hi Xavier,

I am not an expert but perhaps my reply will do until someone more
knowledgeable comes along.

garrido@lal.in2p3.fr writes:

> Dear orgers,
>
> Sometimes ago Eric Schulte posted a Makefile to run the exporter in a 
> asynchronous way (see 
> http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00788.html). 
> I am wondering if it is possible to use =emacsclient= in order not to 
> load any special init file but the current emacs settings. I have tried 
> to setup something like that
>
> emacsclient -n --eval '(org-beamer-export-to-pdf)' talk.org
>
> but then I get stuck inside my current emacs frame waiting for an output 
> file. Can someone helps me on this issue. Maybe the solution is trivial 
> and I'm too noob to catch it.

I think your command tells emacsclient to open talk.org.

You could try this:

emacs -Q --batch -l my-config.el --eval \
      '(progn (find-file "talk.org")(org-beamer-export-to-pdf))'

Where my-config.el sets load paths and loads all the things it needs
(e.g. org-mode).  If you don't load a config file you need to specify
everything in the --eval option.  For example here is what I have been
using, (it has extra escape characters (i.e. \\) and no line
continuations because it was read from a file):

emacs -Q --batch --eval \"(progn
                  (add-to-list 'load-path
                         (expand-file-name \\"~/.emacs.d/plugins/org-mode/lisp/\\"))
                       (add-to-list 'load-path
                      (expand-file-name \\"~/.emacs.d/plugins/org-mode/contrib/lisp/\\" t))
                  (require 'org)
                       (require 'ox)
                  (require 'org-exp)
                       (require 'org-inlinetask)
                  (require 'ob-plantuml)
                       (setq org-plantuml-jar-path \\"/home/myles/Downloads/plantuml.jar\\")
                       (org-babel-do-load-languages
                        'org-babel-load-languages
                      '((emacs-lisp . t)
                          (sh . t)
                          (plantuml . t)))
                       (setq org-confirm-babel-evaluate nil)
                       (setq org-latex-listings 'minted)
                  (setq org-latex-with-hyperref nil)
                     (add-to-list 'org-latex-packages-alist '(\\"\\"
                     \\"minted\\"))
(add-to-list 'org-latex-classes 
    '(\\"mynewthesis\\" \\"\\\\\\documentclass[11pt]{mythesis}\\"
     (\\"\\\\\\chapter{%s}\\" . \\"\\\\\\chapter*{%s}\\")
     (\\"\\\\\\section{%s}\\" . \\"\\\\\\section*{%s}\\")
     (\\"\\\\\\subsection{%s}\\" . \\"\\\\\\subsection*{%s}\\")
     (\\"\\\\\\subsubsection{%s}\\" . \\"\\\\\\subsubsection*{%s}\\")
     (\\"\\\\\\paragraph{%s}\\" . \\"\\\\\\paragraph*{%s}\\")))
                     (setq org-export-with-todo-keywords nil)
                 (load-library \\"/home/myles/lib/lisp/my-export.el\\")
                 (add-to-list 'org-export-before-parsing-hook 'my-export-delete-headlines-tagged-noheading)
                 (add-to-list 'org-export-filter-link-functions 'my-autoref-filter-link-func)
              (load-file \\"thesis.el\\")
                  (find-file \\"${CMAKE_CURRENT_BINARY_DIR}/mainThesis.org\\")
                  (org-latex-export-to-latex))\"

Myles

  reply	other threads:[~2013-10-08 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 18:56 Makefile to export to html/pdf using emacsclient Garrido Xavier
2013-10-08 21:42 ` Myles English [this message]
2013-10-09 14:34 ` Nick Dokos
2013-10-09 15:59   ` Garrido Xavier

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=87ob6z782n.fsf@gmail.com \
    --to=mylesenglish@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=garrido@lal.in2p3.fr \
    /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).