Julian Stecklina <firstname.lastname@example.org> wrote:
| email@example.com (Rob Warnock) writes:
| > Still, it might be possible to come up with CL versions of the "run",
| > "fork", "pipe", etc. macros that *don't* try to implicitly backquote
| > their arguments, and which must be given explicitly backquoted args.
| > That is, the original example could work in CL if it looked liked this:
| > (let ((foo "filename"))
| > (cl-run `(ls -l ,foo)))
| Ok, as you have successfully pointed out, there is no way to do a
| one-to-one port from scsh to CL. But I regard some features of scsh
| superfluous. So (run (mplayer -q ,arg ,@file)) in scsh might not be
| portable to CL, because of implicit backquoting and
| case-sensitivity. My solution would be (run ("mplayer" "-q" arg
| . file)). It's debatable whether the dot-thing is a nice idea... But
| at least it is clearly recognisable from the macro's point of view
| what is a variable and what is to be copied verbatim.
I actually like using the original syntax, but manually adding an
explicit backquote where needed, e.g. (run `(mplayer -q ,arg ,@file)).
It keeps the code looking very close to the original Scsh style
[though not close enough for painless portability, obviously],
and would let you just point people at the Scsh documentation
with an addendum that said, "Oh, yeah, since this is CL you have
to manually add an explicit backquote before the arguments of
the following macros: RUN, EXEC-EPF, ..."
Looking at "cheat.txt" [quick ref] in the distribution, it basically
looks like you need a backquote in front of any EPF ("extended process
form", in Scsh terms). [Is it just that simple?!?]
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607