From: "Berry, Charles" <ccberry@ucsd.edu>
To: stardiviner <numbchild@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [PATCH] support insert link without write result to :file link
Date: Thu, 29 Mar 2018 16:30:04 +0000 [thread overview]
Message-ID: <AF3B292C-9518-4AD7-B20B-A624DE94FE25@ucsd.edu> (raw)
In-Reply-To: <11213e2f-ed9e-71bb-5732-bbf99bbb2999@gmail.com>
> On Mar 28, 2018, at 8:39 PM, stardiviner <numbchild@gmail.com> wrote:
>
> `:results file` will write non-empty result to `:file`. But `:results link` don't, it just insert a link of `:file` at result. And that is what I want to solve in the first post of this thread.
The :post header arg will allow this.
In the examples below the first code line in the src block writes a file that is not subsequently overwritten.
#+name: file-output
#+begin_src emacs-lisp
(org-babel-result-to-file *this*)
#+end_src
#+begin_src R :results raw :post file-output()
cat("this is a test",file="testit.out")
"testit.out"
#+end_src
#+RESULTS:
[[file:testit.out]]
#+name: file-output2
#+begin_src emacs-lisp :var fname="xxx"
(org-babel-result-to-file fname)
#+end_src
#+begin_src R :results raw :post file-output2("testit2.out")
cat("this is a test",file="testit2.out")
#+end_src
#+RESULTS:
[[file:testit2.out]]
HTH,
Chuck
prev parent reply other threads:[~2018-03-29 16:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 15:35 How to let ob-shell to download file and get result as a link to file? stardiviner
2018-03-26 18:06 ` Michael Welle
2018-03-27 2:56 ` [PATCH] support insert link without write result to :file link stardiviner
2018-03-27 6:26 ` Nicolas Goaziou
2018-03-28 16:11 ` stardiviner
2018-03-28 16:23 ` Nicolas Goaziou
2018-03-29 3:39 ` stardiviner
2018-03-29 16:30 ` Berry, Charles [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AF3B292C-9518-4AD7-B20B-A624DE94FE25@ucsd.edu \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=numbchild@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.