From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: new exporter, conditional options according to backend
Date: Fri, 25 Jan 2013 14:23:41 +0100 [thread overview]
Message-ID: <87wqv19z1e.fsf@gmail.com> (raw)
In-Reply-To: <87pq0uqq2z.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Thu, 24 Jan 2013 21:32:52 +0100")
Hello,
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
> Sorry for hijacking this thread. But I am also interested in backend
> specific options. Could you give an example of how to achieve something
> like this with the new exporter:
>
> #+begin_src R :results graphics :file (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'e-latex)) "foo.pdf" "foo.png")
> plot(1:10)
> #+end_src
You need to process the buffer being exported before Babel blocks are
expanded. You could use `org-export-before-processing-hook' for that.
For example, you could define a specific extension for :file values,
like "foo.xxx", process the buffer and and replace "xxx" with an
appropriate extension according to the current back-end (the argument of
the function).
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2013-01-25 13:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 15:47 new exporter, conditional options according to backend Ezequiel Birman
2013-01-19 22:48 ` Nicolas Goaziou
2013-01-20 4:38 ` Ezequiel Birman
2013-01-20 5:35 ` Jambunathan K
2013-01-20 9:28 ` Nicolas Goaziou
2013-01-20 16:22 ` Jambunathan K
2013-01-28 7:12 ` Nicolas Goaziou
2013-01-24 20:32 ` Andreas Leha
2013-01-25 13:23 ` Nicolas Goaziou [this message]
2013-01-25 17:37 ` cberry
2013-01-25 17:50 ` Nicolas Goaziou
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=87wqv19z1e.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=andreas.leha@med.uni-goettingen.de \
--cc=emacs-orgmode@gnu.org \
/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).