emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Makefile to export to html/pdf using emacsclient
@ 2013-10-08 18:56 Garrido Xavier
  2013-10-08 21:42 ` Myles English
  2013-10-09 14:34 ` Nick Dokos
  0 siblings, 2 replies; 4+ messages in thread
From: Garrido Xavier @ 2013-10-08 18:56 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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.

Thanks for your help,
Xavier
-- 

   |
   |__     GARRIDO Xavier       Laboratoire de l'Accélérateur Linéaire
    /\     NEMO                 Université Paris-Sud 11
   /--\    garrido@lal.in2p3.fr UMR 8607
   |       garrido@in2p3.fr     Batiment 200
   |__     +33 1.64.46.84.28    91898 Orsay Cedex, France

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Makefile to export to html/pdf using emacsclient
  2013-10-08 18:56 Makefile to export to html/pdf using emacsclient Garrido Xavier
@ 2013-10-08 21:42 ` Myles English
  2013-10-09 14:34 ` Nick Dokos
  1 sibling, 0 replies; 4+ messages in thread
From: Myles English @ 2013-10-08 21:42 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Makefile to export to html/pdf using emacsclient
  2013-10-08 18:56 Makefile to export to html/pdf using emacsclient Garrido Xavier
  2013-10-08 21:42 ` Myles English
@ 2013-10-09 14:34 ` Nick Dokos
  2013-10-09 15:59   ` Garrido Xavier
  1 sibling, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2013-10-09 14:34 UTC (permalink / raw)
  To: emacs-orgmode

Garrido Xavier <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.
>

Shot in the dark: what happens if you use (org-beamer-export-to-pdf t)?
--
Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Makefile to export to html/pdf using emacsclient
  2013-10-09 14:34 ` Nick Dokos
@ 2013-10-09 15:59   ` Garrido Xavier
  0 siblings, 0 replies; 4+ messages in thread
From: Garrido Xavier @ 2013-10-09 15:59 UTC (permalink / raw)
  To: Nick Dokos, emacs-orgmode; +Cc: mylesenglish

Le 09/10/2013 16:34, Nick Dokos a écrit :
> Garrido Xavier <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.
>>
>
> Shot in the dark: what happens if you use (org-beamer-export-to-pdf t)?

The same, it is still waiting for an output file.

Following Myles answer I get something almost working by doing

emacsclient -n --eval '(progn (find-file 
"talk.org")(org-beamer-export-to-pdf))'

It switches the buffer to the "talk.org" in my current emacs frame but 
it is almost working.

Xavier


> --
> Nick
>
>

-- 

   |
   |__     GARRIDO Xavier       Laboratoire de l'Accélérateur Linéaire
    /\     NEMO                 Université Paris-Sud 11
   /--\    garrido@lal.in2p3.fr UMR 8607
   |       garrido@in2p3.fr     Batiment 200
   |__     +33 1.64.46.84.28    91898 Orsay Cedex, France

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-09 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 18:56 Makefile to export to html/pdf using emacsclient Garrido Xavier
2013-10-08 21:42 ` Myles English
2013-10-09 14:34 ` Nick Dokos
2013-10-09 15:59   ` Garrido Xavier

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).