From: Eric Schulte <schulte.eric@gmail.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] shell does not unquote
Date: Thu, 06 Feb 2014 19:13:31 -0700 [thread overview]
Message-ID: <87iosrbr1m.fsf@gmail.com> (raw)
In-Reply-To: CAJcAo8tK=ZnW7Vvm6-ZrUHNEfocmkG3FgeDsitHa8TiG_-9Y8Q@mail.gmail.com
Samuel Wales <samologist@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.eric@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
next prev parent reply other threads:[~2014-02-07 2:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 5:49 [babel] shell does not unquote Samuel Wales
2014-02-06 0:49 ` Eric Schulte
2014-02-06 8:28 ` Samuel Wales
2014-02-06 20:12 ` Eric Schulte
2014-02-06 21:55 ` Samuel Wales
2014-02-07 2:13 ` Eric Schulte [this message]
2014-02-09 1:39 ` Samuel Wales
2014-02-10 3:18 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iosrbr1m.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=samologist@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.