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: Stefan Monnier
Subject: Re: Quote file name args to start-process-shell-command?
Date: Thu, 12 Oct 2006 10:47:45 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I think the current situation is misleading: the "&rest ARGS" gives the
impression that these are separate args to the command, whereas they're just
arbitrary strings concatenated to COMMAND (which really can itself be
anything rather than a file name).

Just as obviously, this can't be fixed by quoting the arguments, because it
would defeat the purpose: you may as well use `start-process' and avoid the
whole shell problem.

I suggest the patch below to fix this problem: let the caller do the
concatenation/quoting, so she gets what she expects.  It's really not that
big a deal.


        Stefan


* auto-adding address@hidden/emacs--monnier--0--patch-405 to greedy revision 
library /home/monnier/tmp/arch-lib
* found immediate ancestor revision in library 
(address@hidden/emacs--monnier--0--patch-404)
* patching for this revision (address@hidden/emacs--monnier--0--patch-405)
--- orig/lisp/subr.el
+++ mod/lisp/subr.el
@@ -2304,11 +2304,9 @@
  an output stream or filter function to handle the output.
  BUFFER may be also nil, meaning that this process is not associated
  with any buffer
-COMMAND is the name of a shell command.
-Remaining arguments are the arguments for the command.
-Wildcards and redirection are handled as usual in the shell.
+COMMAND is the shell command to run.
 
-\(fn NAME BUFFER COMMAND &rest COMMAND-ARGS)"
+\(fn NAME BUFFER COMMAND)"
   (cond
    ((eq system-type 'vax-vms)
     (apply 'start-process name buffer args))




reply via email to

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