From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: [PATCH] support insert link without write result to :file link Date: Thu, 29 Mar 2018 16:30:04 +0000 Message-ID: References: <87zi2u90f6.fsf@luisa.c0t0d0s0.de> <11516348-a184-6f9e-6a10-15fe4b06d0fb@gmail.com> <87o9jarq4l.fsf@nicolasgoaziou.fr> <55a201ba-d990-ede1-cf12-a6a3814d1979@gmail.com> <874ll0qie3.fsf@nicolasgoaziou.fr> <11213e2f-ed9e-71bb-5732-bbf99bbb2999@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1aRP-00085J-Oj for emacs-orgmode@gnu.org; Thu, 29 Mar 2018 12:30:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1aRK-00028a-QN for emacs-orgmode@gnu.org; Thu, 29 Mar 2018 12:30:19 -0400 Received: from iport-bcv3-out.ucsd.edu ([132.239.0.89]:50204) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1aRK-00025i-AV for emacs-orgmode@gnu.org; Thu, 29 Mar 2018 12:30:14 -0400 In-Reply-To: <11213e2f-ed9e-71bb-5732-bbf99bbb2999@gmail.com> Content-Language: en-US Content-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: stardiviner Cc: "emacs-orgmode@gnu.org" , Nicolas Goaziou > On Mar 28, 2018, at 8:39 PM, stardiviner wrote: >=20 > `:results file` will write non-empty result to `:file`. But `:results lin= k` don't, it just insert a link of `:file` at result. And that is what I wa= nt to solve in the first post of this thread. The :post header arg will allow this.=20 In the examples below the first code line in the src block writes a file th= at is not subsequently overwritten. #+name: file-output #+begin_src emacs-lisp =20 (org-babel-result-to-file *this*)=20 #+end_src #+begin_src R :results raw :post file-output() cat("this is a test",file=3D"testit.out") "testit.out" #+end_src #+RESULTS: [[file:testit.out]] #+name: file-output2 #+begin_src emacs-lisp :var fname=3D"xxx"=20 (org-babel-result-to-file fname)=20 #+end_src #+begin_src R :results raw :post file-output2("testit2.out") cat("this is a test",file=3D"testit2.out") #+end_src #+RESULTS: [[file:testit2.out]] HTH, Chuck=