emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] noninteractive use of org-export


From: Thorsten Jolitz
Subject: Re: [O] noninteractive use of org-export
Date: Wed, 16 Apr 2014 17:06:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Julien Cubizolles <address@hidden> writes:

> How can I use org-beamer-export-to-pdf for example for an org file that
> the current buffer isn't visiting?
>
> My setup is the following : I have two org files cours-beamer.org and
> cours-notes.org each containing different +LATEX_CLASS and
> +LATEX_CLASS_OPTIONS choices and the same +#INCLUDE "cours.org"
> file. I'd like to be able to run the export to beamer-pdf for both
> cours-beamer.org and cours-notes.org from cours.org, or even from a bash
> script but the documentation for org-beamer-export-to-pdf doesn't show
> how.

This is untested! But maybe ...

#+begin_src emacs-lisp
  (defvar my-beamer-files '("/path/to/file1" "/path/to/file2"))

  (defun my-beamer-exp-fun ()
    (interactive)
    (when (consp my-beamer-files)
      (mapc
       (lambda (--file)
         (with-current-buffer (find-file --file)
           (org-mode)
           (org-beamer-export-to-pdf)
           (kill-buffer)))
       my-beamer-files)))
#+end_src

#+results:
: my-beamer-exp-fun

-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]