emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug?? #+begin_src sh :file
@ 2017-09-16 13:09 Charles Millar
  2017-09-16 13:46 ` Thierry Banel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Charles Millar @ 2017-09-16 13:09 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

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
__

[-- Attachment #2: Type: text/html, Size: 1143 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug?? #+begin_src sh :file
  2017-09-16 13:09 Bug?? #+begin_src sh :file Charles Millar
@ 2017-09-16 13:46 ` Thierry Banel
  2017-09-16 16:59 ` Achim Gratz
  2017-09-16 18:55 ` Grant Rettke
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Banel @ 2017-09-16 13:46 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug?? #+begin_src sh :file
  2017-09-16 13:09 Bug?? #+begin_src sh :file Charles Millar
  2017-09-16 13:46 ` Thierry Banel
@ 2017-09-16 16:59 ` Achim Gratz
  2017-09-16 18:55 ` Grant Rettke
  2 siblings, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2017-09-16 16:59 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug?? #+begin_src sh :file
  2017-09-16 13:09 Bug?? #+begin_src sh :file Charles Millar
  2017-09-16 13:46 ` Thierry Banel
  2017-09-16 16:59 ` Achim Gratz
@ 2017-09-16 18:55 ` Grant Rettke
  2017-09-17  0:28   ` Charles Millar
  2 siblings, 1 reply; 5+ messages in thread
From: Grant Rettke @ 2017-09-16 18:55 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode@gnu.org

On Sat, Sep 16, 2017 at 9:09 AM, Charles Millar <millarc@verizon.net> wrote:
> The following ECL is based on Grant Rettke's Org Scraps -

Correction: They are Eric Schulte's (https://www.cs.unm.edu/~eschulte/)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug?? #+begin_src sh :file
  2017-09-16 18:55 ` Grant Rettke
@ 2017-09-17  0:28   ` Charles Millar
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Millar @ 2017-09-17  0:28 UTC (permalink / raw)
  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 <millarc@verizon.net> wrote:
>> 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  
Grant for the link.

Charlie

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-17  0:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-16 13:09 Bug?? #+begin_src sh :file Charles Millar
2017-09-16 13:46 ` Thierry Banel
2017-09-16 16:59 ` Achim Gratz
2017-09-16 18:55 ` Grant Rettke
2017-09-17  0:28   ` Charles Millar

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).