From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: Makefile to export to html/pdf using emacsclient Date: Tue, 08 Oct 2013 22:42:56 +0100 Message-ID: <87ob6z782n.fsf@gmail.com> References: <5254554A.8010806@lal.in2p3.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTf3Y-0007lU-A5 for emacs-orgmode@gnu.org; Tue, 08 Oct 2013 17:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTf3T-0006TM-W1 for emacs-orgmode@gnu.org; Tue, 08 Oct 2013 17:43:04 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:56173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTf3T-0006TB-Ob for emacs-orgmode@gnu.org; Tue, 08 Oct 2013 17:42:59 -0400 Received: by mail-wg0-f53.google.com with SMTP id x12so9681462wgg.8 for ; Tue, 08 Oct 2013 14:42:58 -0700 (PDT) In-reply-to: <5254554A.8010806@lal.in2p3.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Garrido Xavier Cc: "emacs-orgmode@gnu.org" 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