emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org babel and alternative output file when using +call


From: Eric Schulte
Subject: Re: [Orgmode] org babel and alternative output file when using +call
Date: Wed, 27 Oct 2010 10:20:27 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Hi Henning,

This is a limitation of the current #+call: line syntax.  The header
arguments you are passing at the end of the call line are being applied
to the call line, not to the original R code block.  This has come up
before and the proposed solution is to allow passing arguments directly
through to the called code block, using a syntax like

#+call: eight[:session *R*]() :results vector

in which case the ":results vector" header argument is applied to the
call line, and the ":session *R*" header argument is passed through to
the called R code block (in the above case named "eight").

So, while what you want is not currently possible, it should be so in
the future, it's just a question of when...

Best -- Eric

Henning Redestig <address@hidden> writes:

> Dear list,
>
> When I do
>
> #+source: test(myarg="blabla")
> #+begin_src R :session :file test.pdf
>   plot(1:10, main=myarg)
> #+end_src
>
> I get the expected result:
>
> #+results: test
> [[file:test.pdf]]
>
> but if I later do
>
> #+call: test(myarg="hiho") :file test2.pdf
>
> I still get a file named according to the header argument specified in
> the original source block:
>
> #+results: test(myarg="hiho")
> [[file:test.pdf]]
>
> instead of what I hoped for:
>
> #+results: test(myarg="hiho")
> [[file:test2.pdf]]
>
> Is this intended? I think it would be very useful if I could change
> the file name in '+calls' like this to get different plots for
> different arguments.
>
> Using:
>
> GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0) of
> 2009-09-27 on crested, modified by Debian
> Org-mode version 7.01trans
>
> Best regards,



reply via email to

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