From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: Re: return link to :file when using #+call Date: Sun, 23 Jan 2011 01:13:09 +0000 Message-ID: <20110123011309.69b6a11c@bill> References: <20101231000534.3e9e97ea@bill> <87oc7ueebz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=49225 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgoVl-0002sE-SJ for emacs-orgmode@gnu.org; Sat, 22 Jan 2011 20:12:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgoVk-0006aW-NB for emacs-orgmode@gnu.org; Sat, 22 Jan 2011 20:12:57 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:44107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgoVk-0006aR-Ig for emacs-orgmode@gnu.org; Sat, 22 Jan 2011 20:12:56 -0500 Received: by wwb17 with SMTP id 17so3303818wwb.30 for ; Sat, 22 Jan 2011 17:12:55 -0800 (PST) In-Reply-To: <87oc7ueebz.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode@gnu.org Thanks for your answer Eric. Recent changes as per http://thread.gmane.org/gmane.emacs.orgmode/35396 means that this no longer works. To recap: what I would like to do is to #+call an R source block, passing a filename, and have it write a plot to that file and also insert a link to that file in the org file. Any ideas? Here is what I have tried: #+source: foo() #+begin_src R :file bar.png :results graphics plot(1,1) #+end_src #+call: foo[:file baz.png]() #+results: foo[:file baz.png]() : baz.png baz.png contains a plot, but no file link is inserted. #+call: foo() #+results: foo() : bar.png bar.png contains a plot, but no file link is inserted. #+call: foo[:file biff.png]() :file biff.png #+results: foo[:file biff.png]() [[file:biff.png]] a file link is inserted but file biff.png contains 'biff.png' #+call: foo[:file pow.png]() :file pow.png :results graphics #+results: foo[:file pow.png]() [[file:pow.png]] a file link is inserted but file pow.png contains 'pow.png' Thanks, Myles On Wed, 05 Jan 2011 23:28:00 -0700 "Eric Schulte" wrote: > Hi Myles, > > Currently I believe the best option is the solution you posted below, > the file name is repeated because both the code block and the call > line need to know the file name to create the file and the link > respectively. > > Cheers -- Eric > > Myles English writes: > > > Myles English gmail.com> writes: > > > >> #+source: foo() > >> #+begin_src R :file bar.png > >> plot(1,1) > >> #+end_src > > > > This works but I have to repeat the filename: > > > > #+call: foo[:file baz.png]() :file baz.png > > > > #+results: foo[:file baz.png]() > > [[file:baz.png]] > > > > Myles > > > > > > _______________________________________________ > > Emacs-orgmode mailing list > > Please use `Reply All' to send replies to the list. > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode