From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: org babel and alternative output file when using +call Date: Wed, 27 Oct 2010 10:20:27 -0600 Message-ID: <87hbg7fvzo.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=38806 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB94x-0001D5-Hy for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 12:42:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PB8js-0002QH-3v for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 12:20:37 -0400 Received: from mail-qy0-f176.google.com ([209.85.216.176]:45769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PB8js-0002Q9-16 for emacs-orgmode@gnu.org; Wed, 27 Oct 2010 12:20:36 -0400 Received: by qyk4 with SMTP id 4so892834qyk.0 for ; Wed, 27 Oct 2010 09:20:35 -0700 (PDT) In-Reply-To: (Henning Redestig's message of "Wed, 27 Oct 2010 11:38:00 -0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Henning Redestig Cc: emacs-orgmode@gnu.org 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 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,