[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: return link to :file when using #+call
From: |
Myles English |
Subject: |
Re: [Orgmode] Re: return link to :file when using #+call |
Date: |
Sun, 23 Jan 2011 01:13:09 +0000 |
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" <address@hidden> 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 <address@hidden> writes:
>
> > Myles English <mylesenglish <at> 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.
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode