GNU bug report logs - #18745
24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> users.sourceforge.net>

Date: Thu, 16 Oct 2014 04:35:01 UTC

Severity: minor

Found in versions 25.0.50, 24.3

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #88 received at 18745 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18745 <at> debbugs.gnu.org
Subject: Re: bug#18745:
Date: Fri, 30 Oct 2015 15:25:37 +0100
[Message part 1 (text/plain, inline)]
> I would be very surprised that the process-environment does not affect
call-process, so I *must* be missing something obvious. I'll take a closer
look as soon as I have a little more time.

OK, now this is freak.

REM ---- test.bat ---
@echo off
echo TEST=%TEST>test.log
echo COMSPEC=%COMSPEC>>test.log
REM -- end of test.bat ---


C:\...\test> emacs -Q --batch --eval "(call-process
\"c:/devel/emacs/repo/trunk/test.bat\")"

C:\...\test> type test.log
TEST=AAA
COMSPEC=C:\bin64\JPSoft\TCMD\TCC.EXE

C:\...\test> emacs -Q --batch --eval "(let ((process-environment
'(\"TEST=BBB\" \"COMSPEC=C:\\Windows\\system32\\cmd.exe\"))) (call-process
\"c:/devel/emacs/repo/trunk/test.bat\"))"

C:\...\test> type test.log
TEST=BBB
COMSPEC=C:\bin64\JPSoft\TCMD\TCC.EXE

Is that expected?
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.