Samuel Wales <samolog...@gmail.com> writes: > thanks for the examples, but they don't meet my needs as tables for > each set of arguments would be too unwieldy. >
How about this. #+name: list #+begin_src sh :var files="" :results verbatim IFS=" " for file in $files;do echo "-|$file|-" done #+end_src #+call: list("1 space\nnospace") #+RESULTS: : -|1 space|- : -|nospace|- > > what would be ideal is to allow setting noweb expansions in the call > line (instead of requiring named blocks to provide the expansion). > i.e. it is similar to setting a var, but is a noweb setting instead. > > then i would just do the call with the files i want, quoted the way i want. > > may i make this a feature request? > I'm not sure that the additional utility justifies the added complexity. Best, > > > On 2/6/14, Eric Schulte <schulte.e...@gmail.com> wrote: >> #+name: files-tab >> | with space | >> | nospace | >> >> #+name: files-ex >> : with space >> : nospace >> >> #+name: list >> #+begin_src sh :var files="" :results verbatim >> IFS=" >> " >> for file in $files;do >> echo "-|$file|-" >> done >> #+end_src >> >> #+call: list(files-tab) >> >> #+RESULTS: >> : -|with space|- >> : -|nospace|- >> >> #+call: list(files-ex) >> >> #+RESULTS: >> : -|with space|- >> : -|nospace|- -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D