[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Makefile to export to html/pdf using emacsclient
From: |
Myles English |
Subject: |
Re: [O] Makefile to export to html/pdf using emacsclient |
Date: |
Tue, 08 Oct 2013 22:42:56 +0100 |
User-agent: |
mu4e 0.9.9.5; emacs 24.3.1 |
Hi Xavier,
I am not an expert but perhaps my reply will do until someone more
knowledgeable comes along.
address@hidden 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