From: Myles English <mylesenglish@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: return link to :file when using #+call
Date: Sun, 23 Jan 2011 01:13:09 +0000 [thread overview]
Message-ID: <20110123011309.69b6a11c@bill> (raw)
In-Reply-To: <87oc7ueebz.fsf@gmail.com>
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" <schulte.eric@gmail.com> 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 <mylesenglish@gmail.com> 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.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2011-01-23 1:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-31 0:05 return link to :file when using #+call Myles English
2011-01-01 22:57 ` Myles English
2011-01-06 6:28 ` Eric Schulte
2011-01-23 1:13 ` Myles English [this message]
2011-01-23 9:14 ` Dan Davison
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=20110123011309.69b6a11c@bill \
--to=mylesenglish@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/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).