emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quote file name args to start-process-shell-command?


From: Stuart D. Herring
Subject: Re: Quote file name args to start-process-shell-command?
Date: Thu, 12 Oct 2006 11:11:45 -0700 (PDT)
User-agent: SquirrelMail/1.4.6-7.el3.7lanl

>> I agree with the gist of your patch which removes the confusion about
>> the args.
>
>> But it does this only in the doc string, not the code itself.  This
>> gives the function "hidden" backwards compatibility.
>
>> I don't think that is really a good idea: I think the code should
>> follow suit.
>
> Well, I guess the docstring should do like the `sit-for' does, and mention
> the old calling convention and mention that it's deprecated.

Unless it makes sense on VMS (about which I know nothing) to do something
like (start-process "foo" "*bar*" "ls -l") (since
`start-process-shell-command' redirects to an identical `start-process'
call on VMS), which would be the preferred mode of operation for this
function, the function is broken already.

I tend to agree with David that, as written, this function is
fundamentally confused (and confusing): if the client (a Lisp program)
really has separate arguments for a process (a "command line"), it should
be calling `start-process' anyway.  If a client has a true command line,
it should (be required to) do any dynamic construction required for the
command itself if only to make it obvious to the reader what construction
is occurring.

To me, the only question is whether the whole-command-as-string case works
on VMS: if it does, we can just change the argument list, avoid calling
`apply', and hope that the compatibility impact isn't too great (I see
that all 2 calls to s-p-s-c in 21 use just one string, and that in 22 only
pgg-pgp5.el, pgg-pgp.el, and grep.el have calls to s-p-s-c or c-p-s-c that
would need changing).  If my earlier example doesn't work on VMS, though,
we still need to change the argument list just because the function will
have to do some magic to make the command work (possibly involving
emulating the shell to some extent) and it would be far too confusing to
layer that transformation on top of the implied argument concatenation.

For what it's worth, the implementation-equivalent
`call-process-shell-command' didn't exist in 21, so there's no
compatibility consideration there.  If we decide to actually make the
change, I'll be glad to write the change and fix those three files to be
compatible.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]