bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shel


From: Stefan Monnier
Subject: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args
Date: Thu, 16 Oct 2014 16:15:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>   (call-process-shell-command
>    "cmd.exe" nil t t
>    "/c \"c:/path with space/foo-bar.bat\" \"x y\"")

A few things to note:

- The "rest" arguments to call-process-shell-command are deprecated.
  I.e. you should use

    (call-process-shell-command
     "cmd.exe /c \"c:/path with space/foo-bar.bat\" \"x y\"" nil t t)

  instead (which is equivalent anyway, and I think it's more honest
  since it doesn't make it seem like those rest args are correctly
  separated).

- Why not use call-process instead (since you don't actually use the
  "shell-command" part, really)?
  Something like either

    (call-process "cmd.exe" nil t t
                  "/c" "\"c:/path with space/foo-bar.bat\" \"x y\"")
  or
    (call-process "c:/path with space/foo-bar.bat" nil t t "x" "y")


        Stefan





reply via email to

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