From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Millar Subject: Bug?? #+begin_src sh :file Date: Sat, 16 Sep 2017 09:09:44 -0400 Message-ID: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------9D2FDD95994B27B627ED3AEB" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtCr1-0007Tn-5e for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 09:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtCqy-0006pT-06 for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 09:09:51 -0400 Received: from omr-a004e.mx.aol.com ([204.29.186.52]:53164) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dtCqx-0006pC-RD for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 09:09:47 -0400 Received: from mtaout-aag02.mx.aol.com (mtaout-aag02.mx.aol.com [172.26.126.78]) by omr-a004e.mx.aol.com (Outbound Mail Relay) with ESMTP id 287893800097 for ; Sat, 16 Sep 2017 09:09:47 -0400 (EDT) Received: from [10.0.0.2] (0x5b31302e302e302e325d [74.106.194.188]) by mtaout-aag02.mx.aol.com (MUA/Third Party Client Interface) with ESMTPA id AEF6E38000084 for ; Sat, 16 Sep 2017 09:09:45 -0400 (EDT) Content-Language: en-US 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: "emacs-orgmode@gnu.org" This is a multi-part message in MIME format. --------------9D2FDD95994B27B627ED3AEB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, The following ECL is based on Grant Rettke's Org Scraps - https://eschulte.github.io/org-scraps/scraps/2011-02-15-recutils.html #+begin_src sh :file this.txt cat << EOF > this.txt 1 2 3 EOF #+end_src When I execute the code block the file "this.txt" is created and so is a link, i.e. #+RESULTS: _file:this.txt _However, the file is empty. According to the documentation for :file I expected the following in "this.txt" 1 2 3 I tried :exports results but this.txt is still empty A bug? Or what am I missing? Charlie Millar __ --------------9D2FDD95994B27B627ED3AEB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hi,

The following ECL is based on Grant Rettke's Org Scraps - https://eschulte.github.io/org-scraps/scraps/2011-02-15-recutils.html

#+begin_src sh :file this.txt

cat << EOF > this.txt

1
2
3

EOF

#+end_src

When I execute the code block the file "this.txt" is created and so is a link, i.e.

#+RESULTS:
file:this.txt

However, the file is empty. According to the documentation for :file I expected the following in "this.txt"

1
2
3

I tried :exports results but this.txt is still empty

A bug? Or what am I missing?

Charlie Millar
--------------9D2FDD95994B27B627ED3AEB-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: Bug?? #+begin_src sh :file Date: Sat, 16 Sep 2017 15:46:32 +0200 Message-ID: <59BD2B38.3090409@free.fr> References: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtDQa-0008Tt-Gf for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 09:46:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtDQZ-0007sy-Eg for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 09:46:36 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]:12138) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dtDQZ-0007sO-8n for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 09:46:35 -0400 Received: from [IPv6:2a01:e35:2e21:def0:351e:772c:a55d:35db] (unknown [IPv6:2a01:e35:2e21:def0:351e:772c:a55d:35db]) by smtp2-g21.free.fr (Postfix) with ESMTP id A0F9F200373 for ; Sat, 16 Sep 2017 15:46:32 +0200 (CEST) In-Reply-To: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> 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: emacs-orgmode@gnu.org I get the expected result without the redirection: #+begin_src sh :file this.txt cat << EOF 1 2 3 EOF #+end_src On 16/09/2017 15:09, Charles Millar wrote: > > Hi, > > The following ECL is based on Grant Rettke's Org Scraps - > https://eschulte.github.io/org-scraps/scraps/2011-02-15-recutils.html > > #+begin_src sh :file this.txt > > cat << EOF > this.txt > > 1 > 2 > 3 > > EOF > > #+end_src > > When I execute the code block the file "this.txt" is created and so is > a link, i.e. > > #+RESULTS: > _file:this.txt > > _However, the file is empty. According to the documentation for :file > I expected the following in "this.txt" > > 1 > 2 > 3 > > I tried :exports results but this.txt is still empty > > A bug? Or what am I missing? > > Charlie Millar From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Bug?? #+begin_src sh :file Date: Sat, 16 Sep 2017 18:59:27 +0200 Message-ID: <87d16q7f68.fsf@Rainer.invalid> References: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtGRU-0007x3-Mr for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 12:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtGRP-0005h0-SA for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 12:59:44 -0400 Received: from [195.159.176.226] (port=38969 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtGRP-0005fZ-Ld for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 12:59:39 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dtGRE-0006eF-UH for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 18:59:28 +0200 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: emacs-orgmode@gnu.org Charles Millar writes: > A bug? Or what am I missing? You are creating a file that Org is supposed to fill with the output from your script. Your script doesn't produce output, but instead writes to the same file. When the script returns, Org dutifully truncates the file to nothing. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: Bug?? #+begin_src sh :file Date: Sat, 16 Sep 2017 14:55:34 -0400 Message-ID: References: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtIFf-0008IN-Tv for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 14:55:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtIFe-0002xQ-RP for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 14:55:39 -0400 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:45485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtIFe-0002wk-Ia for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 14:55:38 -0400 Received: by mail-lf0-x232.google.com with SMTP id d17so4931972lfe.2 for ; Sat, 16 Sep 2017 11:55:36 -0700 (PDT) In-Reply-To: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> 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: Charles Millar Cc: "emacs-orgmode@gnu.org" On Sat, Sep 16, 2017 at 9:09 AM, Charles Millar wrote: > The following ECL is based on Grant Rettke's Org Scraps - Correction: They are Eric Schulte's (https://www.cs.unm.edu/~eschulte/) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Millar Subject: Re: Bug?? #+begin_src sh :file Date: Sat, 16 Sep 2017 20:28:37 -0400 Message-ID: References: <495e460e-4d4c-9468-64cd-6f1cb37dc7ad@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtNS0-0001MG-3t for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 20:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtNRw-0002vf-W1 for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 20:28:44 -0400 Received: from omr-a005e.mx.aol.com ([204.29.186.50]:56553) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dtNRw-0002vU-Ri for emacs-orgmode@gnu.org; Sat, 16 Sep 2017 20:28:40 -0400 Received: from mtaout-aaj01.mx.aol.com (mtaout-aaj01.mx.aol.com [172.27.3.205]) by omr-a005e.mx.aol.com (Outbound Mail Relay) with ESMTP id 2C662380009A for ; Sat, 16 Sep 2017 20:28:40 -0400 (EDT) Received: from [10.0.0.2] (0x5b31302e302e302e325d [74.106.194.188]) by mtaout-aaj01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPA id 6C9E738000087 for ; Sat, 16 Sep 2017 20:28:39 -0400 (EDT) In-Reply-To: Content-Language: en-US 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: "emacs-orgmode@gnu.org" On 09/16/17 14:55, Grant Rettke wrote: > On Sat, Sep 16, 2017 at 9:09 AM, Charles Millar w= rote: >> The following ECL is based on Grant Rettke's Org Scraps - > Correction: They are Eric Schulte's (https://www.cs.unm.edu/~eschulte/) > Thanks to Thierry and Achim for the correction and explanation and to=C2=A0= =20 Grant for the link. Charlie