Re: Babel: Store script in external file

2019-12-17 Thread Berry, Charles
> On Dec 16, 2019, at 1:53 PM, Michael Gauland wrote: > > I've just started playing with #+INCLUDE, so I may not be using it correctly, > but this works for me. Indeed, if what the OP wants is to wrap just that code as a src block and export it and any results it produces during export

Re: Babel: Store script in external file

2019-12-16 Thread Michael Gauland
I've just started playing with #+INCLUDE, so I may not be using it correctly, but this works for me. I have a file 'sh_test', which looks like: for i in $(seq 10); do echo $i done My org file: #+HEADER: :exports both #+INCLUDE: "sh_test" src sh And the results: , | for i in $(seq 10);

Re: Babel: Store script in external file

2019-12-16 Thread Berry, Charles
> On Dec 15, 2019, at 5:21 PM, Nathan Neff wrote: > > Hello all, > > I think I'm missing something basic: I'd like to have something like this: > > #+begin_src python > #+filename: foo.py > > Instead of storing my Python code in the current org file, I would like > Babel to read foo.py

Re: Babel: Store script in external file

2019-12-16 Thread Michael Welle
Hello, Nathan Neff writes: > Hello all, > > I think I'm missing something basic: I'd like to have something like this: > > #+begin_src python > #+filename: foo.py > > Instead of storing my Python code in the current org file, I would like > Babel to read foo.py and execute it, as if it was

Babel: Store script in external file

2019-12-15 Thread Nathan Neff
Hello all, I think I'm missing something basic: I'd like to have something like this: #+begin_src python #+filename: foo.py Instead of storing my Python code in the current org file, I would like Babel to read foo.py and execute it, as if it was inside the .org file. The foo.py mentioned