From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 00:34:04 2014 Received: (at submit) by debbugs.gnu.org; 16 Oct 2014 04:34:04 +0000 Received: from localhost ([127.0.0.1]:45081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeclH-0006sR-7t for submit@debbugs.gnu.org; Thu, 16 Oct 2014 00:34:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51349) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeclE-0006s2-Uy for submit@debbugs.gnu.org; Thu, 16 Oct 2014 00:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeclD-0007Zt-FI for submit@debbugs.gnu.org; Thu, 16 Oct 2014 00:34:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeclD-0007Zp-4Z for submit@debbugs.gnu.org; Thu, 16 Oct 2014 00:33:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeclB-0008Vd-RM for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 00:33:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeclA-0007ZQ-Bu for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 00:33:57 -0400 Received: from mail-vc0-x234.google.com ([2607:f8b0:400c:c03::234]:41512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeclA-0007ZC-6c for bug-gnu-emacs@gnu.org; Thu, 16 Oct 2014 00:33:56 -0400 Received: by mail-vc0-f180.google.com with SMTP id le20so2095891vcb.39 for ; Wed, 15 Oct 2014 21:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=u8NG/bLqWpoE7Ew1Jg3YbDwgkBfL9O1WBGmpcLes2oc=; b=msZeTkCuBrHjvVQ6ZTTE+/ZEpkVwN6Bi8fqQt9YPET/uMh6cNaBkbehc2FghFX+cVR ONJWHVd9DzFs7ItrE2gQkrDCoIqemRagQfWCl2pinUgREY0JIW3rV/w7Md4LdAZpBT1E 7aqR1uCUuAnwGY9sqTeJ4+bZoeR3yuQYkRzKHhkvzY4eMuGVlfJyc2Y8hecKKbxqgaA6 OLJcIgEdeOmQJi8L0XGBaIXeAXoWoQjaKvPncYkN5z8A1ZtyDUBuA8r5BJtxlZeYRcUC nLgetbwpfzddmRWSrF4a4uo0PHmkHo8rUInpKzBetQoD86n6K/HykddThR2NMNJdKhhK ZsUA== MIME-Version: 1.0 X-Received: by 10.220.202.72 with SMTP id fd8mr155598vcb.59.1413434035290; Wed, 15 Oct 2014 21:33:55 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Wed, 15 Oct 2014 21:33:55 -0700 (PDT) Date: Thu, 16 Oct 2014 00:33:55 -0400 X-Google-Sender-Auth: jxu1pHGTfiA1Mg-TfHobyFrs0SU Message-ID: Subject: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) >From emacs -Q, evaluating (call-process-shell-command (shell-quote-argument "c:/path with space/foo-bar.bat") nil t t (shell-quote-argument "x y")) or the equivalent (call-process-shell-command "\"c:/path with space/foo-bar.bat\"" nil t t "\"x y\"") gives 'c:/path' is not recognized as an internal or external command, operable program or batch file. It also fails for paths without a space: (call-process-shell-command "\"c:/path-without-space/foo-bar.bat\"" nil t t "\"x y\"") gives 'c:/path-without-space/foo-bar.bat" "x' is not recognized as an internal or external command, operable program or batch file. Doing the same with an .exe file works correctly. Quoting the spaces with ^ works for the .bat file: (call-process-shell-command "c:/path^ with^ space/foo-bar.bat" nil t t "\"x y\"") gives this is foo-bar, arg1 = "x y", arg2 = But this doesn't work for .exe files. foo-bar.bat has contents @echo this is foo-bar, arg1 = %1, arg2 = %2 In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.7) --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' Important settings: value of $LANG: ENC locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( c a l l - s h e l C-M-i SPC C-a C-y C-k C-x C-e C-p C-p C-p C-M-f C-o C-o C-p RET C-y C-x C-e C-p C-p C-p C-f C-SPC C-M-f M-w C-x C-x M-w M-x r e p o r t SPC e m Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set 1 Mark set 1 Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32 multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 02:50:05 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 06:50:05 +0000 Received: from localhost ([127.0.0.1]:45160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xeesv-0002AC-2t for submit@debbugs.gnu.org; Thu, 16 Oct 2014 02:50:05 -0400 Received: from mtaout24.012.net.il ([80.179.55.180]:35843) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xeess-00029g-BO for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 02:50:03 -0400 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NDI00D00XQE5D00@mtaout24.012.net.il> for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 09:43:35 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDI00DE8YONF320@mtaout24.012.net.il>; Thu, 16 Oct 2014 09:43:35 +0300 (IDT) Date: Thu, 16 Oct 2014 09:50:02 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83ppds4ig5.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 16 Oct 2014 00:33:55 -0400 > From: Noam Postavsky > > >From emacs -Q, evaluating > > (call-process-shell-command (shell-quote-argument "c:/path with > space/foo-bar.bat") nil t t (shell-quote-argument "x y")) > > or the equivalent > > (call-process-shell-command "\"c:/path with space/foo-bar.bat\"" nil > t t "\"x y\"") > > gives > > 'c:/path' is not recognized as an internal or external command, > operable program or batch file. > > It also fails for paths without a space: > > (call-process-shell-command "\"c:/path-without-space/foo-bar.bat\"" > nil t t "\"x y\"") > > gives > > 'c:/path-without-space/foo-bar.bat" "x' is not recognized as an > internal or external command, > operable program or batch file. This is a Windows misfeature, not an Emacs bug: the CreateProcess primitive fails like that when passed a command that is a batch file. To work around, try using cmd.exe as the command, and the batch file with arguments as its arguments, with "/c" prepended. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 09:47:33 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 13:47:33 +0000 Received: from localhost ([127.0.0.1]:45422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XelOu-0005mJ-On for submit@debbugs.gnu.org; Thu, 16 Oct 2014 09:47:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:61041) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XelOj-0005lq-Mh for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 09:47:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQHCxQYDRABE4gM0hkXjnoHhDgEqRmBaoFxgVsh X-IPAS-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQHCxQYDRABE4gM0hkXjnoHhDgEqRmBaoFxgVsh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94347179" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Oct 2014 09:47:21 -0400 Received: by pastel.home (Postfix, from userid 20848) id A171E85A2; Thu, 16 Oct 2014 09:47:20 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args Message-ID: References: <83ppds4ig5.fsf@gnu.org> Date: Thu, 16 Oct 2014 09:47:20 -0400 In-Reply-To: <83ppds4ig5.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Oct 2014 09:50:02 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> (call-process-shell-command "\"c:/path-without-space/foo-bar.bat\"" >> nil t t "\"x y\"") [...] > This is a Windows misfeature, not an Emacs bug: the CreateProcess > primitive fails like that when passed a command that is a batch file. > To work around, try using cmd.exe as the command, and the batch file > with arguments as its arguments, with "/c" prepended. But call-process-shell-command (contrary to call-process) should already be using cmd.exe, no? Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 09:57:22 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 13:57:22 +0000 Received: from localhost ([127.0.0.1]:46022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XelYP-00068q-DB for submit@debbugs.gnu.org; Thu, 16 Oct 2014 09:57:21 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:34948) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XelYM-00068k-St for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 09:57:19 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NDJ00100HP4HG00@mtaout29.012.net.il> for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 16:56:16 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDJ00086IPRA140@mtaout29.012.net.il>; Thu, 16 Oct 2014 16:56:16 +0300 (IDT) Date: Thu, 16 Oct 2014 16:57:19 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <8338ao3yo0.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: Noam Postavsky , 18745@debbugs.gnu.org > Date: Thu, 16 Oct 2014 09:47:20 -0400 > > >> (call-process-shell-command "\"c:/path-without-space/foo-bar.bat\"" > >> nil t t "\"x y\"") > [...] > > This is a Windows misfeature, not an Emacs bug: the CreateProcess > > primitive fails like that when passed a command that is a batch file. > > To work around, try using cmd.exe as the command, and the batch file > > with arguments as its arguments, with "/c" prepended. > > But call-process-shell-command (contrary to call-process) should already > be using cmd.exe, no? No, shell-file-name on Windows is set to invoke cmdproxy. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 12:29:03 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 16:29:03 +0000 Received: from localhost ([127.0.0.1]:46155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XenvC-0004C3-SR for submit@debbugs.gnu.org; Thu, 16 Oct 2014 12:29:03 -0400 Received: from mail-vc0-f176.google.com ([209.85.220.176]:50211) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xenv9-0004Bc-JR for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 12:29:00 -0400 Received: by mail-vc0-f176.google.com with SMTP id hq11so2949869vcb.21 for <18745@debbugs.gnu.org>; Thu, 16 Oct 2014 09:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HHSyxWj+Xu/8j7hXYLsdly9GplygYlBsQl4oFUldpYU=; b=tr9iyNjcXXfHe3goRWnD1pzb8+5/hgEKztYT8WkvDN5MANgYrQAjUOGYcY39+lRoBQ tcvaP3nm2Kg/BC1hsAROrrZ4oj1UvgnQZWd9FDqWW997MlF8kwa3XiKVV9XW1vTIbwVT 0BoY9QRjJq4rXllgRaILZvpmgHDW1xWiz6+0tbuC5QWSvaOZh9JJPKyVwbNp0FDU2Uel EOBAB/ncO/trI+J/PSfinh6IYlrhnXEYvL3LMS7zKcL2s9EAaUvQ08H64q/VpxnlKT8G jepaXIGNbuQTuJbWYWuP425oW1h7XzPoW0WEcNFL5omK/kresflXuFoqGspHL26aWIY3 6jzA== MIME-Version: 1.0 X-Received: by 10.221.46.196 with SMTP id up4mr2587680vcb.2.1413476938628; Thu, 16 Oct 2014 09:28:58 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Thu, 16 Oct 2014 09:28:58 -0700 (PDT) In-Reply-To: <83ppds4ig5.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> Date: Thu, 16 Oct 2014 12:28:58 -0400 X-Google-Sender-Auth: h9PVn-_9OevyWV_f6uwfrKw2-uw Message-ID: Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Oct 16, 2014 at 2:50 AM, Eli Zaretskii wrote: > This is a Windows misfeature, not an Emacs bug: the CreateProcess > primitive fails like that when passed a command that is a batch file. So there is no way for Emacs to paper over the Windows ugliness? > To work around, try using cmd.exe as the command, and the batch file > with arguments as its arguments, with "/c" prepended. Doesn't work :( I tried (call-process-shell-command "cmd.exe" nil t t "/c" "\"c:/path with space/foo-bar.bat\"" "\"x y\"") (call-process-shell-command "cmd.exe" nil t t "/c \"c:/path with space/foo-bar.bat\" \"x y\"") (call-process-shell-command "cmd.exe" nil t t "/c" "c:/path with space/foo-bar.bat" "x y") All of them give 'c:/path' is not recognized as an internal or external command, operable program or batch file. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 13:06:33 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 17:06:33 +0000 Received: from localhost ([127.0.0.1]:46160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeoVU-0005DY-B4 for submit@debbugs.gnu.org; Thu, 16 Oct 2014 13:06:32 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:43509) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeoVR-0005DO-4A for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 13:06:30 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NDJ00900RCYOZ00@mtaout26.012.net.il> for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 20:04:44 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDJ005N5RFWXW30@mtaout26.012.net.il>; Thu, 16 Oct 2014 20:04:44 +0300 (IDT) Date: Thu, 16 Oct 2014 20:06:29 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83oatc2bca.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 16 Oct 2014 12:28:58 -0400 > From: Noam Postavsky > Cc: 18745@debbugs.gnu.org > > On Thu, Oct 16, 2014 at 2:50 AM, Eli Zaretskii wrote: > > This is a Windows misfeature, not an Emacs bug: the CreateProcess > > primitive fails like that when passed a command that is a batch file. > > So there is no way for Emacs to paper over the Windows ugliness? I don't know. In fact, I don't even know the exact nature of the "ugliness", as these intimate details of the CreateProcess API are not documented anywhere, AFAIK, at least not officially. I just know about this because I bumped into it in the past. This is exacerbated in Emacs by the fact that the shell command is processed twice: once by Emacs, and then again by cmdproxy. GNU Make overcomes this by detecting these cases, and invoking CreateProcess in a special way (NULL as the first argument), see the function process_begin there, around line 710 of sub_proc.c in the GNU Make sources. If you can come up with a way to do the same in Emacs, by some suitable patch to cmdproxy.c, such a patch will be welcome (assuming either the patch is small, or you will agree to sign legal papers necessary for submitting substantial patches to FSF projects). Failing that, I can suggest a workaround: use the short 8+3 alias of the file name with whitespace. You can obtain the short alias of any existing file's name by calling w32-short-filename. Then you won't need to quote the batch file name. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 16:15:34 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 20:15:34 +0000 Received: from localhost ([127.0.0.1]:46235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XerSO-0001cH-39 for submit@debbugs.gnu.org; Thu, 16 Oct 2014 16:15:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64616) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XerSL-0001c8-Nu for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 16:15:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCw4mBwsUGA0kiAzSGReOegeEOASpGYFqgXGBWyE X-IPAS-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCw4mBwsUGA0kiAzSGReOegeEOASpGYFqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94382059" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Oct 2014 16:15:28 -0400 Received: by pastel.home (Postfix, from userid 20848) id A09C685A2; Thu, 16 Oct 2014 16:15:28 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args Message-ID: References: <83ppds4ig5.fsf@gnu.org> Date: Thu, 16 Oct 2014 16:15:28 -0400 In-Reply-To: (Noam Postavsky's message of "Thu, 16 Oct 2014 12:28:58 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > (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 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 17:31:00 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 21:31:00 +0000 Received: from localhost ([127.0.0.1]:46428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XesdQ-0003zg-1W for submit@debbugs.gnu.org; Thu, 16 Oct 2014 17:31:00 -0400 Received: from mail-vc0-f170.google.com ([209.85.220.170]:62557) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XesdO-0003zY-6k for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 17:30:58 -0400 Received: by mail-vc0-f170.google.com with SMTP id hy10so3418319vcb.15 for <18745@debbugs.gnu.org>; Thu, 16 Oct 2014 14:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mMan+6iVB265g2TG8BfDRef2xB2R4aParmRvrmE1VWc=; b=IWRY3k3gTrGGYVVv/UfVmc6KUo32UwNdHJ98Yd4wMW2yXyxiDqtpVvL47G9SGoJxVy 84uuhL4Z3h/O2FMEqK0PzJ7289MFBlxNnHPqYzzVNyDuk2osn03Zr+DYtcbUWauymkZv ZuOMYQIt7C3Wdq6dbO0gQgEEuFxHy7ZdGdwkSu2uGwQzzu6j7zuCl6cefGMhL/SQVw9q J9mapkWDOwuHY6qgz/ytjZMLBmihbxgJcgeoohaZg1gbL393rvcaGP6habQsg/lz5c1O Gbo6H7DVjHnIPHAiIRRnf8kjiqKJqdUR9JX4Mz3T9+wEj0UclRLOSWtxdHzzMruQOGEJ zDRw== MIME-Version: 1.0 X-Received: by 10.52.72.78 with SMTP id b14mr3306843vdv.55.1413495057612; Thu, 16 Oct 2014 14:30:57 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Thu, 16 Oct 2014 14:30:57 -0700 (PDT) In-Reply-To: <83oatc2bca.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> Date: Thu, 16 Oct 2014 17:30:57 -0400 X-Google-Sender-Auth: lGPrKBDcVaTS8GsLveRpBjMekXQ Message-ID: Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Oct 16, 2014 at 1:06 PM, Eli Zaretskii wrote: > GNU Make overcomes this by detecting these cases, and invoking > CreateProcess in a special way (NULL as the first argument), see the > function process_begin there, around line 710 of sub_proc.c in the GNU > Make sources. If you can come up with a way to do the same in Emacs, > by some suitable patch to cmdproxy.c, such a patch will be welcome > (assuming either the patch is small, or you will agree to sign legal > papers necessary for submitting substantial patches to FSF projects). I'll take a look (btw I have already signed for Emacs). > Failing that, I can suggest a workaround: use the short 8+3 alias of > the file name with whitespace. You can obtain the short alias of any > existing file's name by calling w32-short-filename. Then you won't > need to quote the batch file name. s/w32-short-filename/w32-short-file-name/ That works regardless if the program is a bat or exe which will make things simpler, thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 17:50:38 2014 Received: (at 18745) by debbugs.gnu.org; 16 Oct 2014 21:50:38 +0000 Received: from localhost ([127.0.0.1]:46434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeswO-0004Ws-42 for submit@debbugs.gnu.org; Thu, 16 Oct 2014 17:50:36 -0400 Received: from mail-vc0-f171.google.com ([209.85.220.171]:47967) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeswL-0004Wj-1r for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 17:50:33 -0400 Received: by mail-vc0-f171.google.com with SMTP id hy10so3449403vcb.2 for <18745@debbugs.gnu.org>; Thu, 16 Oct 2014 14:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fIifqk7TzkxqOjZH/tuF3o9KPLyuPYZ/18o5VSJtqPI=; b=WZME6kv5K83XuXoH+8Ut6w371NnsgxDre2Nvejf62OgSliz24yyiYmasYxsbO1caaS 0nOtpwQ1T/2HNZIFAt2X2R4twgzKAfTMjOEsut/lMZEoKef09Y4Bl4hhrRevqURHUoL9 /BahJe3nLARuXE8sc2gzxC+p29JNXRLi4COM/DnbX5nW1/tJ5pZTRjorXNiioLE1tWcj gRWgm37g7O1mn80Fvo/l13C6xVYENNUnoZbXjDyujhWQ6OtzQIAeEyO/3Yqcjo96VGWJ ieIqOweHuLYac2bWMU8CMLw6BDKRD4xssV0UX2PTlWDImJcGW99Wh7DPvS6Cn+q1HVb2 CLuA== MIME-Version: 1.0 X-Received: by 10.52.78.5 with SMTP id x5mr3402724vdw.18.1413496232421; Thu, 16 Oct 2014 14:50:32 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Thu, 16 Oct 2014 14:50:32 -0700 (PDT) In-Reply-To: References: <83ppds4ig5.fsf@gnu.org> Date: Thu, 16 Oct 2014 17:50:32 -0400 X-Google-Sender-Auth: C-BotfEXtafktFHnxL751ikOlgw Message-ID: Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Oct 16, 2014 at 4:15 PM, Stefan Monnier wrote: > - The "rest" arguments to call-process-shell-command are deprecated. I was unaware of that, is it written anywhere? > - Why not use call-process instead (since you don't actually use the > "shell-command" part, really)? That would probably make more sense, but it turns out not to help anyway: > (call-process "cmd.exe" nil t t > "/c" "\"c:/path with space/foo-bar.bat\" \"x y\"") '\"c:/path with space/foo-bar.bat\"' is not recognized as an internal or external command, operable program or batch file. > (call-process "c:/path with space/foo-bar.bat" nil t t "x" "y") 'c:\path' is not recognized as an internal or external command, operable program or batch file. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 16 20:38:45 2014 Received: (at 18745) by debbugs.gnu.org; 17 Oct 2014 00:38:45 +0000 Received: from localhost ([127.0.0.1]:46467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XevZ6-0000Yf-6p for submit@debbugs.gnu.org; Thu, 16 Oct 2014 20:38:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:10546) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XevZ2-0000YU-Bt for 18745@debbugs.gnu.org; Thu, 16 Oct 2014 20:38:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSrw0hAmBFxd0giYBAQRWIxALDiYHCxQYDRABE4gM0hkXjnoHhDgEqRmBaoFxgVsh X-IPAS-Result: AuYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSrw0hAmBFxd0giYBAQRWIxALDiYHCxQYDRABE4gM0hkXjnoHhDgEqRmBaoFxgVsh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="94395137" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Oct 2014 20:38:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id F1DE385A2; Thu, 16 Oct 2014 20:38:38 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args Message-ID: References: <83ppds4ig5.fsf@gnu.org> Date: Thu, 16 Oct 2014 20:38:38 -0400 In-Reply-To: (Noam Postavsky's message of "Thu, 16 Oct 2014 17:50:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> - The "rest" arguments to call-process-shell-command are deprecated. > I was unaware of that, is it written anywhere? It's new in 24.4 (it was actually an oversight: this calling convention was deprecated for start-process-shell-command in 24.1 IIRC, but for some reason I didn't notice that it was also used in call-process-shell-command). >> - Why not use call-process instead (since you don't actually use the >> "shell-command" part, really)? > That would probably make more sense, but it turns out not to help anyway: I kind of guessed it. I remember reports that starting commands with a space in its name is pretty much impossible. In the case that the space is in the directory name, I heard you might work around that by adding the directory to exec-path: (let ((exec-path (cons "c:/path with space/" exec-path))) (call-process "foo-bar.bat" nil t t "x" "y") This is all hearsay, tho, because luckily I never need to use a Windows system. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 17 02:05:02 2014 Received: (at 18745) by debbugs.gnu.org; 17 Oct 2014 06:05:02 +0000 Received: from localhost ([127.0.0.1]:46515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xf0er-00029M-Q0 for submit@debbugs.gnu.org; Fri, 17 Oct 2014 02:05:02 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:33458) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xf0eo-000291-4F for 18745@debbugs.gnu.org; Fri, 17 Oct 2014 02:04:59 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NDK00D00R7O0W00@a-mtaout22.012.net.il> for 18745@debbugs.gnu.org; Fri, 17 Oct 2014 09:04:56 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDK00C42RK7PGB0@a-mtaout22.012.net.il>; Fri, 17 Oct 2014 09:04:56 +0300 (IDT) Date: Fri, 17 Oct 2014 09:05:00 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83bnpb2pv7.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 16 Oct 2014 17:50:32 -0400 > From: Noam Postavsky > Cc: Eli Zaretskii , 18745@debbugs.gnu.org > > > - Why not use call-process instead (since you don't actually use the > > "shell-command" part, really)? > > That would probably make more sense, but it turns out not to help anyway: Since call-process-shell-command simply calls call-process, that's expected. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 17 02:10:43 2014 Received: (at 18745) by debbugs.gnu.org; 17 Oct 2014 06:10:43 +0000 Received: from localhost ([127.0.0.1]:46519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xf0kL-0002J1-UH for submit@debbugs.gnu.org; Fri, 17 Oct 2014 02:10:43 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:33732) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xf0kJ-0002Is-Ar for 18745@debbugs.gnu.org; Fri, 17 Oct 2014 02:10:40 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NDK00E00RG8H800@mtaout26.012.net.il> for 18745@debbugs.gnu.org; Fri, 17 Oct 2014 09:08:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDK00ASLRQVEO40@mtaout26.012.net.il>; Fri, 17 Oct 2014 09:08:55 +0300 (IDT) Date: Fri, 17 Oct 2014 09:10:42 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83a94v2plp.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: Eli Zaretskii , 18745@debbugs.gnu.org > Date: Thu, 16 Oct 2014 20:38:38 -0400 > > I remember reports that starting commands with a space in its name > is pretty much impossible. That's an entirely different problem, the reason being how Windows normalizes file names. It has nothing to do with CreateProcess quirks. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 21 21:12:36 2014 Received: (at 18745) by debbugs.gnu.org; 22 Oct 2014 01:12:36 +0000 Received: from localhost ([127.0.0.1]:58955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgkTb-0004SX-TJ for submit@debbugs.gnu.org; Tue, 21 Oct 2014 21:12:36 -0400 Received: from mail-vc0-f172.google.com ([209.85.220.172]:49133) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgkTZ-0004SD-EA for 18745@debbugs.gnu.org; Tue, 21 Oct 2014 21:12:34 -0400 Received: by mail-vc0-f172.google.com with SMTP id lf12so1314761vcb.17 for <18745@debbugs.gnu.org>; Tue, 21 Oct 2014 18:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=D5tUoBBW+XIQggz43Zb+u5feDCEy4tqpP/r39jAZvcc=; b=qTLyKvf/gFji8t4U/AFMWLTC09e4qSuLnc4/he7stbkh36iBISDwsS3c88ol4bR94o lzS4Rg6gpG7e7AODZ4QakvLBUmtq4f64Bl6fdH1lfY/UrFcJyvAyYf4KzkH26Xw6/L9I bL6lhVrMC0WSr0RN9EYmwMQeRBblF6qMfblutDeDdpeHviX8kYrPkxhPOhpUb1ep6cM6 iSI6BJu2JnzxMcp2zlT54+DP2rWaaHZdWZ66yuWRaAviZH1mc6XlkQeC3VK/XZ4+OhGT fqX4NuNLn99vN4WTtmw6TMNWj29QYrsnKjCr9b7J6V+a1ECLRcMO4cX8LMsDxntl5x7e oMQg== MIME-Version: 1.0 X-Received: by 10.52.98.39 with SMTP id ef7mr27649423vdb.4.1413940347969; Tue, 21 Oct 2014 18:12:27 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Tue, 21 Oct 2014 18:12:27 -0700 (PDT) In-Reply-To: References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> Date: Tue, 21 Oct 2014 21:12:27 -0400 X-Google-Sender-Auth: 5wz89GD0Dd2R06RoO2Avd7DYXgU Message-ID: Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: Eli Zaretskii Content-Type: multipart/mixed; boundary=20cf307f37ce2dd2e80505f8a489 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --20cf307f37ce2dd2e80505f8a489 Content-Type: text/plain; charset=UTF-8 On Thu, Oct 16, 2014 at 5:30 PM, Noam Postavsky wrote: > On Thu, Oct 16, 2014 at 1:06 PM, Eli Zaretskii wrote: >> GNU Make overcomes this by detecting these cases, and invoking >> CreateProcess in a special way (NULL as the first argument), see the >> function process_begin there, around line 710 of sub_proc.c in the GNU >> Make sources. If you can come up with a way to do the same in Emacs, >> by some suitable patch to cmdproxy.c, such a patch will be welcome >> (assuming either the patch is small, or you will agree to sign legal >> papers necessary for submitting substantial patches to FSF projects). > > I'll take a look (btw I have already signed for Emacs). Patching cmdproxy.c fixes the call-process-shell-command case: (call-process-shell-command "\"c:/path with space/foo-bar.bat\" \"x &y\"" nil '(t t) t) To fix the call-process case: (call-process "c:/path with space/foo-bar.bat" nil '(t t) t "x &y") required a patch to w32proc.c. This is my first patch to Emacs proper; hopefully I got everything in the right format. --20cf307f37ce2dd2e80505f8a489 Content-Type: application/octet-stream; name="bat-quote.ChangeLog" Content-Disposition: attachment; filename="bat-quote.ChangeLog" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i1jyy5d60 MjAxNC0xMC0yMSAgTm9hbSBQb3N0YXZza3kgIDxucG9zdGF2c0B1c2Vycy5zb3VyY2Vmb3JnZXQu bmV0PgoKCVBhcGVyIG92ZXIgTVMgV2luZG93cyBDcmVhdGVQcm9jZXNzIGRlZmljaWVuY2llcyAo QnVnIzE4NzQ1KS4KCgkqIG50L2NtZHByb3h5LmMgKGJhdGNoX2ZpbGVfcCk6IG5ldyBmdW5jdGlv bi4KCShzcGF3bik6IGlmIGNhbGxpbmcgYSBxdW90ZWQgYmF0Y2ggZmlsZSBwYXNzIE5VTEwgZm9y IHByb2duYW1lLgoJKiBzcmMvdzMycHJvYy5jIChjcmVhdGVfY2hpbGQpOiBpZiBjYWxsaW5nIGEg cXVvdGVkIGJhdGNoIGZpbGUKCXBhc3MgTlVMTCBmb3IgZXhlLgo= --20cf307f37ce2dd2e80505f8a489 Content-Type: application/octet-stream; name="bat-quote.patch" Content-Disposition: attachment; filename="bat-quote.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i1jyy5dp1 LS0tIG9yZy9udC9jbWRwcm94eS5jCVR1ZSBPY3QgMjEgMjA6Mzk6MzkgMjAxNAorKysgbmV3L250 L2NtZHByb3h5LmMJVHVlIE9jdCAyMSAyMDoyNzowOCAyMDE0CkBAIC0yMjAsNiArMjIwLDI4IEBA CiAgIHJldHVybiBvIC0gYnVmOwogfQogCisvKiBSZXR1cm4gVFJVRSBpZiBQUk9HTkFNRSBpcyBh IGJhdGNoIGZpbGUgKi8KK0JPT0wKK2JhdGNoX2ZpbGVfcCAoY29uc3QgY2hhciAqcHJvZ25hbWUp Cit7CisgIGNvbnN0IGNoYXIgKmV4dHNbXSA9IHsiLmJhdCIsICIuY21kIn07CisgIGludCBuX2V4 dHMgPSBzaXplb2YgKGV4dHMpIC8gc2l6ZW9mIChjaGFyICopOworICBpbnQgaTsKKworICBjb25z dCBjaGFyICpleHQgPSBzdHJyY2hyKHByb2duYW1lLCAnLicpOworCisgIGlmIChleHQpCisgICAg eworICAgICAgZm9yIChpID0gMDsgaSA8IG5fZXh0czsgaSsrKQorICAgICAgICB7CisgICAgICAg ICAgaWYgKHN0cmljbXAoZXh0LCBleHRzW2ldKSA9PSAwKQorICAgICAgICAgICAgcmV0dXJuIFRS VUU7CisgICAgICAgIH0KKyAgICB9CisKKyAgcmV0dXJuIEZBTFNFOworfQorCiAvKiBTZWFyY2gg Zm9yIEVYRUMgZmlsZSBpbiBESVIuICBJZiBFWEVDIGRvZXMgbm90IGhhdmUgYW4gZXh0ZW5zaW9u LAogICAgRElSIGlzIHNlYXJjaGVkIGZvciBFWEVDIHdpdGggdGhlIHN0YW5kYXJkIGV4dGVuc2lv bnMgYXBwZW5kZWQuICAqLwogaW50CkBAIC00NjksNiArNDkxLDEzIEBACiAKICAgbWVtc2V0ICgm c3RhcnQsIDAsIHNpemVvZiAoc3RhcnQpKTsKICAgc3RhcnQuY2IgPSBzaXplb2YgKHN0YXJ0KTsK KworICAvKiBDcmVhdGVQcm9jZXNzIGhhbmRsZXMgYmF0Y2ggZmlsZXMgYXMgcHJvZ25hbWUgc3Bl Y2lhbGx5LiBUaGlzCisgICAgIHNwZWNpYWwgaGFuZGxpbmcgZmFpbHMgd2hlbiBib3RoIHRoZSBi YXRjaCBmaWxlIGFuZCBhcmd1bWVudHMgYXJlCisgICAgIHF1b3RlZC4gV2UgcGFzcyBOVUxMIGFz IHByb2duYW1lIHRvIGF2b2lkIHRoZSBzcGVjaWFsCisgICAgIGhhbmRsaW5nLiAqLworICBpZiAo cHJvZ25hbWUgIT0gTlVMTCAmJiBjbWRsaW5lWzBdID09ICciJyAmJiBiYXRjaF9maWxlX3AocHJv Z25hbWUpKQorICAgICAgcHJvZ25hbWUgPSBOVUxMOwogCiAgIGlmIChDcmVhdGVQcm9jZXNzIChw cm9nbmFtZSwgY21kbGluZSwgJnNlY19hdHRycywgTlVMTCwgVFJVRSwKIAkJICAgICAwLCBlbnZi bG9jaywgZGlyLCAmc3RhcnQsICZjaGlsZCkpCi0tLSBvcmcvc3JjL3czMnByb2MuYwlUdWUgT2N0 IDIxIDIwOjM5OjQzIDIwMTQKKysrIG5ldy9zcmMvdzMycHJvYy5jCVR1ZSBPY3QgMjEgMjA6Mjc6 MDggMjAxNApAQCAtMTA3OCw2ICsxMDc4LDcgQEAKICAgRFdPUkQgZmxhZ3M7CiAgIGNoYXIgZGly WyBNQVhfUEFUSCBdOwogICBjaGFyICpwOworICBjb25zdCBjaGFyICpleHQ7CiAKICAgaWYgKGNw ID09IE5VTEwpIGVtYWNzX2Fib3J0ICgpOwogCkBAIC0xMTE1LDYgKzExMTYsMTUgQEAKICAgZm9y IChwID0gZGlyOyAqcDsgcCA9IENoYXJOZXh0QSAocCkpCiAgICAgaWYgKCpwID09ICcvJykKICAg ICAgICpwID0gJ1xcJzsKKworICAvKiBDcmVhdGVQcm9jZXNzIGhhbmRsZXMgYmF0Y2ggZmlsZXMg YXMgZXhlIHNwZWNpYWxseS4gVGhpcyBzcGVjaWFsCisgICAgIGhhbmRsaW5nIGZhaWxzIHdoZW4g Ym90aCB0aGUgYmF0Y2ggZmlsZSBhbmQgYXJndW1lbnRzIGFyZQorICAgICBxdW90ZWQuIFdlIHBh c3MgTlVMTCBhcyBleGUgdG8gYXZvaWQgdGhlIHNwZWNpYWwgaGFuZGxpbmcuICovCisgIGlmIChl eGUgJiYgY21kbGluZVswXSA9PSAnIicgJiYKKyAgICAgIChleHQgPSBzdHJyY2hyKGV4ZSwgJy4n KSkgJiYKKyAgICAgICh4c3RyY2FzZWNtcCAoZXh0LCAiLmJhdCIpID09IDAKKyAgICAgICB8fCB4 c3RyY2FzZWNtcCAoZXh0LCAiLmNtZCIpID09IDApKQorICAgICAgZXhlID0gTlVMTDsKIAogICBm bGFncyA9ICghTklMUCAoVnczMl9zdGFydF9wcm9jZXNzX3NoYXJlX2NvbnNvbGUpCiAJICAgPyBD UkVBVEVfTkVXX1BST0NFU1NfR1JPVVAK --20cf307f37ce2dd2e80505f8a489-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 13:12:33 2014 Received: (at 18745) by debbugs.gnu.org; 22 Oct 2014 17:12:33 +0000 Received: from localhost ([127.0.0.1]:60096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgzSb-00057i-41 for submit@debbugs.gnu.org; Wed, 22 Oct 2014 13:12:33 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:58776) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgzSX-00057Q-9g for 18745@debbugs.gnu.org; Wed, 22 Oct 2014 13:12:30 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NDU00F00VHRAZ00@a-mtaout20.012.net.il> for 18745@debbugs.gnu.org; Wed, 22 Oct 2014 20:12:22 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDU00EJSVSLZJ70@a-mtaout20.012.net.il>; Wed, 22 Oct 2014 20:12:22 +0300 (IDT) Date: Wed, 22 Oct 2014 20:12:18 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83k33s81vx.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Tue, 21 Oct 2014 21:12:27 -0400 > From: Noam Postavsky > Cc: 18745@debbugs.gnu.org > > Patching cmdproxy.c fixes the call-process-shell-command case: > > (call-process-shell-command > "\"c:/path with space/foo-bar.bat\" \"x &y\"" nil '(t t) t) > > To fix the call-process case: > > (call-process > "c:/path with space/foo-bar.bat" nil '(t t) t "x &y") > > required a patch to w32proc.c. This is my first patch to Emacs proper; > hopefully I got everything in the right format. Thanks, the changes look reasonable. If you didn't already, please run the test suite and make sure there are no regressions due to these changes. Bonus points for adding specialized tests to test this specific issue. > * nt/cmdproxy.c (batch_file_p): new function. > (spawn): if calling a quoted batch file pass NULL for progname. > * src/w32proc.c (create_child): if calling a quoted batch file > pass NULL for exe. In the future, please begin each ChangeLog entry with a capital letter. > + /* CreateProcess handles batch files as progname specially. This > + special handling fails when both the batch file and arguments are > + quoted. We pass NULL as progname to avoid the special > + handling. */ Please in the future leave 2 spaces between sentences, per the US English convention we use in Emacs. > + if (progname != NULL && cmdline[0] == '"' && batch_file_p(progname)) > + progname = NULL; Our coding style is to leave one space between the function name and the opening parenthesis that follows it. If there are no more comments or objections, I will commit in a few days. Thanks again for working on this. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 21:34:08 2014 Received: (at 18745) by debbugs.gnu.org; 23 Oct 2014 01:34:08 +0000 Received: from localhost ([127.0.0.1]:60381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh7Hz-0001E6-Od for submit@debbugs.gnu.org; Wed, 22 Oct 2014 21:34:08 -0400 Received: from mail-vc0-f179.google.com ([209.85.220.179]:50800) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xh7Hx-0001DX-BU for 18745@debbugs.gnu.org; Wed, 22 Oct 2014 21:34:05 -0400 Received: by mail-vc0-f179.google.com with SMTP id im17so43051vcb.10 for <18745@debbugs.gnu.org>; Wed, 22 Oct 2014 18:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=7RL09wwH8WDZB9d/6L4LDCogV8OXg6PbJ/yJK5bDK6c=; b=lMpfbIIT2Mocq3+ex3+XF55ZMdKpIZG+rbMM0xv1q42NfSNuxPrhpkPUFVXTsFCpvu A2/ypvLF5siUsCkMBbAylbTFmVdMnerQwEtvWasWhH9V+FvL2rCjUAV21H+ZAVlnT9eS A1Zp2qjKHrYMo1vycr3dYmeE+hgxwK1wmZ/RBgn+qJRmjvHK5WxzIZS5PDjrytRC/Wup U/KGGPktl4CyZ/TH6OpISQ29jttZ+cV0yURqIR2qoFKCywVSzWryMtmT/ewhmvzI8uRd thMyhL2kTa9sZHlLp/IlhNP+ZLiV/rrQAJASmRZ7faVrul5yYTCOWKN4ayzNmkMvhsA+ 0hLA== MIME-Version: 1.0 X-Received: by 10.52.86.162 with SMTP id q2mr974112vdz.41.1414028039536; Wed, 22 Oct 2014 18:33:59 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Wed, 22 Oct 2014 18:33:59 -0700 (PDT) In-Reply-To: <83k33s81vx.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> <83k33s81vx.fsf@gnu.org> Date: Wed, 22 Oct 2014 21:33:59 -0400 X-Google-Sender-Auth: h4pqnSAMyT654mhlsaNsu2ZxmVk Message-ID: Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: Eli Zaretskii Content-Type: multipart/mixed; boundary=001a1134a198ffe51305060d0e49 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1134a198ffe51305060d0e49 Content-Type: text/plain; charset=UTF-8 On Wed, Oct 22, 2014 at 1:12 PM, Eli Zaretskii wrote: > Thanks, the changes look reasonable. If you didn't already, please > run the test suite and make sure there are no regressions due to these > changes. Bonus points for adding specialized tests to test this > specific issue. The tests in test/automated? No regressions. Here is a new patch with added test and formatting issues fixed. --001a1134a198ffe51305060d0e49 Content-Type: application/octet-stream; name="bat-quote-v2.ChangeLog" Content-Disposition: attachment; filename="bat-quote-v2.ChangeLog" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i1lfqzlp0 MjAxNC0xMC0yMiAgTm9hbSBQb3N0YXZza3kgIDxucG9zdGF2c0B1c2Vycy5zb3VyY2Vmb3JnZXQu bmV0PgoKCVBhcGVyIG92ZXIgTVMgV2luZG93cyBDcmVhdGVQcm9jZXNzIGRlZmljaWVuY2llcyAo QnVnIzE4NzQ1KS4KCgkqIG50L2NtZHByb3h5LmMgKGJhdGNoX2ZpbGVfcCk6IE5ldyBmdW5jdGlv bi4KCShzcGF3bik6IElmIGNhbGxpbmcgYSBxdW90ZWQgYmF0Y2ggZmlsZSBwYXNzIE5VTEwgZm9y IHByb2duYW1lLgoJKiBzcmMvdzMycHJvYy5jIChjcmVhdGVfY2hpbGQpOiBJZiBjYWxsaW5nIGEg cXVvdGVkIGJhdGNoIGZpbGUKCXBhc3MgTlVMTCBmb3IgZXhlLgoJKiB0ZXN0L2F1dG9tYXRlZC9w cm9jZXNzLXRlc3RzLmVsIChwcm9jZXNzLXRlc3QtcXVvdGVkLWJhdGZpbGUpOgoJTmV3IHRlc3Qu Cgo= --001a1134a198ffe51305060d0e49 Content-Type: application/octet-stream; name="bat-quote-v2.patch" Content-Disposition: attachment; filename="bat-quote-v2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i1lfqzml1 LS0tIG9yZy9udC9jbWRwcm94eS5jCisrKyBuZXcvbnQvY21kcHJveHkuYwpAQCAtMjIwLDYgKzIy MCwyOCBAQAogICByZXR1cm4gbyAtIGJ1ZjsKIH0KIAorLyogUmV0dXJuIFRSVUUgaWYgUFJPR05B TUUgaXMgYSBiYXRjaCBmaWxlLiAqLworQk9PTAorYmF0Y2hfZmlsZV9wIChjb25zdCBjaGFyICpw cm9nbmFtZSkKK3sKKyAgY29uc3QgY2hhciAqZXh0c1tdID0geyIuYmF0IiwgIi5jbWQifTsKKyAg aW50IG5fZXh0cyA9IHNpemVvZiAoZXh0cykgLyBzaXplb2YgKGNoYXIgKik7CisgIGludCBpOwor CisgIGNvbnN0IGNoYXIgKmV4dCA9IHN0cnJjaHIgKHByb2duYW1lLCAnLicpOworCisgIGlmIChl eHQpCisgICAgeworICAgICAgZm9yIChpID0gMDsgaSA8IG5fZXh0czsgaSsrKQorICAgICAgICB7 CisgICAgICAgICAgaWYgKHN0cmljbXAgKGV4dCwgZXh0c1tpXSkgPT0gMCkKKyAgICAgICAgICAg IHJldHVybiBUUlVFOworICAgICAgICB9CisgICAgfQorCisgIHJldHVybiBGQUxTRTsKK30KKwog LyogU2VhcmNoIGZvciBFWEVDIGZpbGUgaW4gRElSLiAgSWYgRVhFQyBkb2VzIG5vdCBoYXZlIGFu IGV4dGVuc2lvbiwKICAgIERJUiBpcyBzZWFyY2hlZCBmb3IgRVhFQyB3aXRoIHRoZSBzdGFuZGFy ZCBleHRlbnNpb25zIGFwcGVuZGVkLiAgKi8KIGludApAQCAtNDY5LDYgKzQ5MSwxMyBAQAogCiAg IG1lbXNldCAoJnN0YXJ0LCAwLCBzaXplb2YgKHN0YXJ0KSk7CiAgIHN0YXJ0LmNiID0gc2l6ZW9m IChzdGFydCk7CisKKyAgLyogQ3JlYXRlUHJvY2VzcyBoYW5kbGVzIGJhdGNoIGZpbGVzIGFzIHBy b2duYW1lIHNwZWNpYWxseS4gVGhpcworICAgICBzcGVjaWFsIGhhbmRsaW5nIGZhaWxzIHdoZW4g Ym90aCB0aGUgYmF0Y2ggZmlsZSBhbmQgYXJndW1lbnRzIGFyZQorICAgICBxdW90ZWQuICBXZSBw YXNzIE5VTEwgYXMgcHJvZ25hbWUgdG8gYXZvaWQgdGhlIHNwZWNpYWwKKyAgICAgaGFuZGxpbmcu ICovCisgIGlmIChwcm9nbmFtZSAhPSBOVUxMICYmIGNtZGxpbmVbMF0gPT0gJyInICYmIGJhdGNo X2ZpbGVfcCAocHJvZ25hbWUpKQorICAgICAgcHJvZ25hbWUgPSBOVUxMOwogCiAgIGlmIChDcmVh dGVQcm9jZXNzIChwcm9nbmFtZSwgY21kbGluZSwgJnNlY19hdHRycywgTlVMTCwgVFJVRSwKIAkJ ICAgICAwLCBlbnZibG9jaywgZGlyLCAmc3RhcnQsICZjaGlsZCkpCi0tLSBvcmcvc3JjL3czMnBy b2MuYworKysgbmV3L3NyYy93MzJwcm9jLmMKQEAgLTEwNzgsNiArMTA3OCw3IEBACiAgIERXT1JE IGZsYWdzOwogICBjaGFyIGRpclsgTUFYX1BBVEggXTsKICAgY2hhciAqcDsKKyAgY29uc3QgY2hh ciAqZXh0OwogCiAgIGlmIChjcCA9PSBOVUxMKSBlbWFjc19hYm9ydCAoKTsKIApAQCAtMTExNSw2 ICsxMTE2LDE1IEBACiAgIGZvciAocCA9IGRpcjsgKnA7IHAgPSBDaGFyTmV4dEEgKHApKQogICAg IGlmICgqcCA9PSAnLycpCiAgICAgICAqcCA9ICdcXCc7CisKKyAgLyogQ3JlYXRlUHJvY2VzcyBo YW5kbGVzIGJhdGNoIGZpbGVzIGFzIGV4ZSBzcGVjaWFsbHkuICBUaGlzIHNwZWNpYWwKKyAgICAg aGFuZGxpbmcgZmFpbHMgd2hlbiBib3RoIHRoZSBiYXRjaCBmaWxlIGFuZCBhcmd1bWVudHMgYXJl IHF1b3RlZC4KKyAgICAgV2UgcGFzcyBOVUxMIGFzIGV4ZSB0byBhdm9pZCB0aGUgc3BlY2lhbCBo YW5kbGluZy4gKi8KKyAgaWYgKGV4ZSAmJiBjbWRsaW5lWzBdID09ICciJyAmJgorICAgICAgKGV4 dCA9IHN0cnJjaHIgKGV4ZSwgJy4nKSkgJiYKKyAgICAgICh4c3RyY2FzZWNtcCAoZXh0LCAiLmJh dCIpID09IDAKKyAgICAgICB8fCB4c3RyY2FzZWNtcCAoZXh0LCAiLmNtZCIpID09IDApKQorICAg ICAgZXhlID0gTlVMTDsKIAogICBmbGFncyA9ICghTklMUCAoVnczMl9zdGFydF9wcm9jZXNzX3No YXJlX2NvbnNvbGUpCiAJICAgPyBDUkVBVEVfTkVXX1BST0NFU1NfR1JPVVAKLS0tIG9yZy90ZXN0 L2F1dG9tYXRlZC9wcm9jZXNzLXRlc3RzLmVsCisrKyBuZXcvdGVzdC9hdXRvbWF0ZWQvcHJvY2Vz cy10ZXN0cy5lbApAQCAtNTAsNCArNTAsMjYgQEAKICAgKHNob3VsZAogICAgKHByb2Nlc3MtdGVz dC1zZW50aW5lbC13YWl0LWZ1bmN0aW9uLXdvcmtpbmctcCAobGFtYmRhICgpIChzaXQtZm9yIDAu MDEgdCkpKSkpCiAKKyh3aGVuIChlcSBzeXN0ZW0tdHlwZSAnd2luZG93cy1udCkKKyAgKGVydC1k ZWZ0ZXN0IHByb2Nlc3MtdGVzdC1xdW90ZWQtYmF0ZmlsZSAoKQorICAgICJDaGVjayB0aGF0IEVt YWNzIGhpZGVzIENyZWF0ZVByb2Nlc3MgZGVmaWNpZW5jeSAoYnVnIzE4NzQ1KS4iCisgICAgKGxl dCAoYmF0ZmlsZSkKKyAgICAgICh1bndpbmQtcHJvdGVjdAorICAgICAgICAgIChwcm9nbgorICAg ICAgICAgICAgOzsgQ3JlYXRlUHJvY2VzcyB3aWxsIGZhaWwgd2hlbiBib3RoIHRoZSBiYXQgZmls ZSBhbmQgMXN0CisgICAgICAgICAgICA7OyBhcmd1bWVudCBhcmUgcXVvdGVkLCBzbyBpbmNsdWRl IHNwYWNlcyBpbiBib3RoIG9mIHRob3NlCisgICAgICAgICAgICA7OyB0byBmb3JjZSBxdW90aW5n LgorICAgICAgICAgICAgKHNldHEgYmF0ZmlsZSAobWFrZS10ZW1wLWZpbGUgImVjaG8gYXJncyIg bmlsICIuYmF0IikpCisgICAgICAgICAgICAod2l0aC10ZW1wLWZpbGUgYmF0ZmlsZQorICAgICAg ICAgICAgICAoaW5zZXJ0ICJAZWNobyBhcmcxID0gJTEsIGFyZzIgPSAlMlxuIikpCisgICAgICAg ICAgICAod2l0aC10ZW1wLWJ1ZmZlcgorICAgICAgICAgICAgICAoY2FsbC1wcm9jZXNzIGJhdGZp bGUgbmlsICcodCB0KSB0ICJ4ICZ5IikKKyAgICAgICAgICAgICAgKHNob3VsZCAoc3RyaW5nPSAo YnVmZmVyLXN0cmluZykgImFyZzEgPSBcInggJnlcIiwgYXJnMiA9IFxuIikpKQorICAgICAgICAg ICAgKHdpdGgtdGVtcC1idWZmZXIKKyAgICAgICAgICAgICAgKGNhbGwtcHJvY2Vzcy1zaGVsbC1j b21tYW5kCisgICAgICAgICAgICAgICAobWFwY29uY2F0ICMnc2hlbGwtcXVvdGUtYXJndW1lbnQg KGxpc3QgYmF0ZmlsZSAieCAmeSIpICIgIikKKyAgICAgICAgICAgICAgIG5pbCAnKHQgdCkgdCkK KyAgICAgICAgICAgICAgKHNob3VsZCAoc3RyaW5nPSAoYnVmZmVyLXN0cmluZykgImFyZzEgPSBc InggJnlcIiwgYXJnMiA9IFxuIikpKSkKKyAgICAgICAgKHdoZW4gYmF0ZmlsZSAoZGVsZXRlLWZp bGUgYmF0ZmlsZSkpKSkpKQorCiAocHJvdmlkZSAncHJvY2Vzcy10ZXN0cykK --001a1134a198ffe51305060d0e49-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 23 11:53:08 2014 Received: (at 18745) by debbugs.gnu.org; 23 Oct 2014 15:53:08 +0000 Received: from localhost ([127.0.0.1]:33120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhKhH-0001ZH-Tb for submit@debbugs.gnu.org; Thu, 23 Oct 2014 11:53:08 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:34820) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhKhF-0001Yl-D9 for 18745@debbugs.gnu.org; Thu, 23 Oct 2014 11:53:06 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NDW00400MIZW600@a-mtaout20.012.net.il> for 18745@debbugs.gnu.org; Thu, 23 Oct 2014 18:52:59 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDW004ODMSALM50@a-mtaout20.012.net.il>; Thu, 23 Oct 2014 18:52:59 +0300 (IDT) Date: Thu, 23 Oct 2014 18:52:58 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: X-012-Sender: halo1@inter.net.il To: Noam Postavsky Message-id: <83tx2u7pgl.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> <83k33s81vx.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 22 Oct 2014 21:33:59 -0400 > From: Noam Postavsky > Cc: 18745@debbugs.gnu.org > > The tests in test/automated? No regressions. Great, thanks. > Here is a new patch with added test and formatting issues fixed. Looks good, thanks. And you do get the bonus points. As I said, will commit in a couple of days. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 25 05:16:57 2014 Received: (at 18745-done) by debbugs.gnu.org; 25 Oct 2014 09:16:57 +0000 Received: from localhost ([127.0.0.1]:34552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhxSy-0006kZ-MC for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:16:56 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:62167) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhxSv-0006kJ-71 for 18745-done@debbugs.gnu.org; Sat, 25 Oct 2014 05:16:54 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NDZ00200TJK8500@a-mtaout23.012.net.il> for 18745-done@debbugs.gnu.org; Sat, 25 Oct 2014 12:16:45 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDZ0020OTRX8K00@a-mtaout23.012.net.il>; Sat, 25 Oct 2014 12:16:45 +0300 (IDT) Date: Sat, 25 Oct 2014 12:16:30 +0300 From: Eli Zaretskii Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args In-reply-to: <83tx2u7pgl.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: npostavs@users.sourceforge.net Message-id: <83zjck4ihd.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> <83k33s81vx.fsf@gnu.org> <83tx2u7pgl.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745-done Cc: 18745-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 23 Oct 2014 18:52:58 +0300 > From: Eli Zaretskii > Cc: 18745@debbugs.gnu.org > > > Date: Wed, 22 Oct 2014 21:33:59 -0400 > > From: Noam Postavsky > > Cc: 18745@debbugs.gnu.org > > > > The tests in test/automated? No regressions. > > Great, thanks. > > > Here is a new patch with added test and formatting issues fixed. > > Looks good, thanks. And you do get the bonus points. > > As I said, will commit in a couple of days. Done, as trunk revision 118196. I'm therefore closing this bug. Thanks a lot for working on this. Btw, the email address mentioned in your copyright assignment is different from the one you used in this thread. Is that address still valid, or should we always use the one you used here? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 25 10:04:08 2014 Received: (at 18745-done) by debbugs.gnu.org; 25 Oct 2014 14:04:08 +0000 Received: from localhost ([127.0.0.1]:35355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi1wt-0000pk-A6 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 10:04:07 -0400 Received: from mail-vc0-f180.google.com ([209.85.220.180]:60320) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi1wq-0000pD-6F for 18745-done@debbugs.gnu.org; Sat, 25 Oct 2014 10:04:04 -0400 Received: by mail-vc0-f180.google.com with SMTP id le20so1117965vcb.25 for <18745-done@debbugs.gnu.org>; Sat, 25 Oct 2014 07:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=kwnFxa6OhB0oepWbw2Zh7pOBInyI7nGMKnYzKyoIswk=; b=r1ae24kqgKXDZVCqgxIRk0hoJ0qT2nxjuxPxm34eRPxBzd+7CbQjni0vQ08v4Lekam EIweDNt0kqdI+HZnsal9IrgedCpU9jGnuinZHUlwVQezdNZy8iFETRnLCCDFrXrOVChy 5/jHZ0vAUul9QRHB9Or8wFHX2kDYihyBGnV373qe3gTj/qqK2WjMBrywDajpIiiLaZy6 C8yVOmEcWnJ+14eqPtvGs0mZfc6vJWSMabhlbjnc+TRXI625geBAfJakg8hw15nBzBTc bhTl0lItgJzlQRQwVywIGFZuf7AGh+iGYXVOEeIRhCUyv+YffRHHpJhLZnSMiFgFJlbR kFGw== MIME-Version: 1.0 X-Received: by 10.52.143.104 with SMTP id sd8mr6411549vdb.15.1414245838244; Sat, 25 Oct 2014 07:03:58 -0700 (PDT) Received: by 10.31.153.141 with HTTP; Sat, 25 Oct 2014 07:03:58 -0700 (PDT) In-Reply-To: <83zjck4ihd.fsf@gnu.org> References: <83ppds4ig5.fsf@gnu.org> <83oatc2bca.fsf@gnu.org> <83k33s81vx.fsf@gnu.org> <83tx2u7pgl.fsf@gnu.org> <83zjck4ihd.fsf@gnu.org> Date: Sat, 25 Oct 2014 10:03:58 -0400 X-Google-Sender-Auth: DV4mHiJyO9a5VReFZpO5RslJscA Message-ID: Subject: Re: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745-done Cc: 18745-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Oct 25, 2014 at 5:16 AM, Eli Zaretskii wrote: > Btw, the email address mentioned in your copyright assignment is > different from the one you used in this thread. Is that address still > valid, or should we always use the one you used here? Oh, this one is just an alias for the other. I generally try to use this one for public mailing lists. From unknown Mon Jun 23 11:27:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Nov 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 07:43:57 2015 Received: (at control) by debbugs.gnu.org; 27 Oct 2015 11:43:57 +0000 Received: from localhost ([127.0.0.1]:40070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zr2fV-0007kB-36 for submit@debbugs.gnu.org; Tue, 27 Oct 2015 07:43:57 -0400 Received: from mail-lf0-f48.google.com ([209.85.215.48]:36504) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zr2fB-0007jl-KJ for control@debbugs.gnu.org; Tue, 27 Oct 2015 07:43:56 -0400 Received: by lffz202 with SMTP id z202so171114030lff.3 for ; Tue, 27 Oct 2015 04:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=1fcwJpwBwx3iS2qDRM18HW96zPYtTjCi0UQtLhPUlEc=; b=WTkl1rCRosNnFBG+rpjjfhnVfRLvaz5ScYPgMzRkuadpM3TSDLxLY27lNCsLq90066 mQSkCZfpsxqpIw8Ry8/d+84tx+/IQkduuyg5JguMZsc0efJWe+Bsh1wbur0MRd9r3yos v1UT/ryGY+3ySWRV0b1WxUur9Bu8kgZmtPSkc7g0y2CPzJdqkDwWCF35KnsvqX+dJolg Yt1gYEWBJ4PeX4GigXlkTgTD9PTRXZZMShcbzpZRNcFy8BMLYfFIFEP2AA1/nlFcq1jL k2sQuGMbru3VkdtVaWJJuuGgMUspMNWQ9CZLErX1uZpTv2t4KfvSfmJKtf/fVr6SQlr+ /wBg== X-Received: by 10.25.20.24 with SMTP id k24mr13306405lfi.117.1445946216488; Tue, 27 Oct 2015 04:43:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Tue, 27 Oct 2015 04:42:56 -0700 (PDT) From: Juanma Barranquero Date: Tue, 27 Oct 2015 12:42:56 +0100 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a113fbfd69926260523149647 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 18745 found 18745 25.0.50 quit unarchive 18745 found 18745 25.0.50 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lekktu[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.48 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 18745 found 18745 25.0.50 quit unarchive 18745 found 18745 25.0.50 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.48 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lekktu[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --001a113fbfd69926260523149647 Content-Type: text/plain; charset=UTF-8 unarchive 18745 found 18745 25.0.50 quit --001a113fbfd69926260523149647 Content-Type: text/html; charset=UTF-8
unarchive 18745
found 18745 25.0.50
quit

--001a113fbfd69926260523149647-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 07:49:44 2015 Received: (at 18745) by debbugs.gnu.org; 27 Oct 2015 11:49:44 +0000 Received: from localhost ([127.0.0.1]:40078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zr2l5-00011c-Ov for submit@debbugs.gnu.org; Tue, 27 Oct 2015 07:49:44 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:35445) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zr2l3-00011U-QK for 18745@debbugs.gnu.org; Tue, 27 Oct 2015 07:49:42 -0400 Received: by lbbes7 with SMTP id es7so61390900lbb.2 for <18745@debbugs.gnu.org>; Tue, 27 Oct 2015 04:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Ix/TEbkPUEzAja69E6MHPuBx92R7DvTVcbGPmwIGb6g=; b=OFuO8J9ypch74HYhLFBUgarQHNUJQgqRx4Hfju4LLmXKGZP5YHMZNZhoQK95xnxvXi w4P02ais/5u7alUusEOZKv2Zr8x6aufME58gH+gljQFC6ky6lHlHhS4eHa0+EbarrAoA Tsqi4iYQv6NRSx2vru+W6/lyioaM4uHuXwYRp42wW61M/udEUeF2KS7TtnsbebYKIbmx OI0FMowUY3JJXG9IHTwIoA7rx27emU3cWqvx5OIld3h/VKOyilNGco6keTMRNQ1xJ9Hj emKU8FHnhWBmllVsQeEgxeDDil9ewy1G9TWCBrla6lH0s7qX9V9opacBCb/JyCBJkmx1 6tbQ== X-Received: by 10.112.17.34 with SMTP id l2mr20276525lbd.117.1445946580864; Tue, 27 Oct 2015 04:49:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Tue, 27 Oct 2015 04:49:01 -0700 (PDT) From: Juanma Barranquero Date: Tue, 27 Oct 2015 12:49:01 +0100 Message-ID: Subject: To: 18745@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a11c3c47c511635052314ac14 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: process-test-quoted-batfile fails on my Windows 10 Home F process-test-quoted-batfile Check that Emacs hides CreateProcess deficiency (bug#18745). (ert-test-failed ((should (string= (buffer-string) "arg1 = \"x &y\", arg2 = ")) :form (string= "arg1 = \"x &y\", arg2 = " "arg1 = \"x &y\", arg2 = ") :value nil)) [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lekktu[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 18745 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: process-test-quoted-batfile fails on my Windows 10 Home F process-test-quoted-batfile Check that Emacs hides CreateProcess deficiency (bug#18745). (ert-test-failed ((should (string= (buffer-string) "arg1 = \"x &y\", arg2 = ")) :form (string= "arg1 = \"x &y\", arg2 = " "arg1 = \"x &y\", arg2 = ") :value nil)) [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.172 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lekktu[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 BLANK_SUBJECT Subject is present but empty 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --001a11c3c47c511635052314ac14 Content-Type: text/plain; charset=UTF-8 process-test-quoted-batfile fails on my Windows 10 Home F process-test-quoted-batfile Check that Emacs hides CreateProcess deficiency (bug#18745). (ert-test-failed ((should (string= (buffer-string) "arg1 = \"x &y\", arg2 = ")) :form (string= "arg1 = \"x &y\", arg2 = " "arg1 = \"x &y\", arg2 = ") :value nil)) The result lacks the trailing space before the \n. "arg1 = \"x &y\", arg2 =\n" instead of "arg1 = \"x &y\", arg2 = \n" --001a11c3c47c511635052314ac14 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
process-test-quoted-batfile fails on my Windows 10 Home
F process-test-quoted-batfile
=C2=A0 =C2=A0= Check that Emacs hides CreateProcess deficiency (bug#18745).
=C2= =A0 =C2=A0 (ert-test-failed
=C2=A0 =C2=A0 =C2=A0((should
=C2=A0 =C2=A0 =C2=A0 =C2=A0(string=3D
(buffer-string)
"arg1 =3D \"x &y\", arg2 = =3D=C2=A0
"))
=C2=A0 =C2=A0 =C2=A0 :form
=C2=A0 =C2=A0 =C2=A0 (string=3D "arg1 =3D \"x &y\", arg= 2 =3D
" "arg1 =3D \"x &y\", arg2 =3D=C2= =A0
")
=C2=A0 =C2=A0 =C2=A0 :value nil))

The result lacks the trailing space before the \n.

"arg1 =3D \"x &y\", arg2 =3D\n&qu= ot;

instead of

"= arg1 =3D \"x &y\", arg2 =3D \n"

=
--001a11c3c47c511635052314ac14-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 15:13:53 2015 Received: (at 18745) by debbugs.gnu.org; 27 Oct 2015 19:13:54 +0000 Received: from localhost ([127.0.0.1]:40837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zr9gv-0004b6-K5 for submit@debbugs.gnu.org; Tue, 27 Oct 2015 15:13:53 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:47046) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zr9gu-0004ax-1h for 18745@debbugs.gnu.org; Tue, 27 Oct 2015 15:13:52 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NWW000007RRSZ00@a-mtaout20.012.net.il> for 18745@debbugs.gnu.org; Tue, 27 Oct 2015 21:13:50 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWW00043832T110@a-mtaout20.012.net.il>; Tue, 27 Oct 2015 21:13:50 +0200 (IST) Date: Tue, 27 Oct 2015 21:14:04 +0200 From: Eli Zaretskii Subject: Re: bug#18745: In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83611s3z0j.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Juanma Barranquero > Date: Tue, 27 Oct 2015 12:49:01 +0100 > > process-test-quoted-batfile fails on my Windows 10 Home > > F process-test-quoted-batfile > Check that Emacs hides CreateProcess deficiency (bug#18745). > (ert-test-failed > ((should > (string= > (buffer-string) > "arg1 = \"x &y\", arg2 = > ")) > :form > (string= "arg1 = \"x &y\", arg2 = > " "arg1 = \"x &y\", arg2 = > ") > :value nil)) > > The result lacks the trailing space before the \n. > > "arg1 = \"x &y\", arg2 =\n" > > instead of > > "arg1 = \"x &y\", arg2 = \n" Do you see the same result if you invoke 'echo' from the cmd prompt? IOW, does this mean Windows 10 changed the behavior of the built-in 'echo', and it now removes trailing whitespace from its argument? If that's the reason, how about modifying the test so that it expects the correct result depending on the value returned by x-server-version? From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 19:25:32 2015 Received: (at 18745) by debbugs.gnu.org; 27 Oct 2015 23:25:32 +0000 Received: from localhost ([127.0.0.1]:40935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrDcS-0006us-2n for submit@debbugs.gnu.org; Tue, 27 Oct 2015 19:25:32 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:34166) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrDc6-0006uG-2U for 18745@debbugs.gnu.org; Tue, 27 Oct 2015 19:25:28 -0400 Received: by lbbwb3 with SMTP id wb3so75146605lbb.1 for <18745@debbugs.gnu.org>; Tue, 27 Oct 2015 16:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Q8N5fzVUZ5FZaawtENiFxS1NkRm+tYU9QkkHlr5nXfw=; b=L8xkvgLsvL1DgzcTEWej4uPzVcdbbsTuVXQQTrmYmgEahG2gk2yW64swqk8eTPSgid 3qnrvgEp/YerNFbhR82VnSh86r3szKlx7n3g3Eu+CpWCxbobqyE6ZMGBKoRkSjkkiIBA iG09FdcNougJkHy5ZK//Cl3t4xpumYZPaRZj1xo0+0HTrZtENx/11GGEidgXd2zt2D83 xjXbX41g497+C+H1XmY7akiG9RocLPftJ8IQuy84wC5rLOIS4fhwOrLzviaPaSSo0sq3 UYvIxtGRnpdfE6xE2BYSfHItF5m78giCpiAlioujfmUebgSPeyvB713/yEVDd8IUrbB8 LldA== X-Received: by 10.112.234.163 with SMTP id uf3mr21527140lbc.15.1445988309327; Tue, 27 Oct 2015 16:25:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Tue, 27 Oct 2015 16:24:29 -0700 (PDT) In-Reply-To: <83611s3z0j.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> From: Juanma Barranquero Date: Wed, 28 Oct 2015 00:24:29 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a11c317e886e61805231e636d X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c317e886e61805231e636d Content-Type: text/plain; charset=UTF-8 On Tue, Oct 27, 2015 at 8:14 PM, Eli Zaretskii wrote: > Do you see the same result if you invoke 'echo' from the cmd prompt? > IOW, does this mean Windows 10 changed the behavior of the built-in > 'echo', and it now removes trailing whitespace from its argument? IIUC your question, no C:\Users\Juanma>echo A>A.txt C:\Users\Juanma>echo B >B.txt C:\Users\Juanma>dir *.txt 28/10/2015 00:23 3 A.txt 28/10/2015 00:23 7 B.txt 2 archivos 10 bytes --001a11c317e886e61805231e636d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Oct 27, 2015 at 8:14 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> Do yo= u see the same result if you invoke 'echo' from the cmd prompt?
= > IOW, does this mean Windows 10 changed the behavior of the built-in> 'echo', and it now removes trailing whitespace from its argum= ent?

IIUC your question, no

C:\Users\Juanma>echo A>A.txt

C:\User= s\Juanma>echo B =C2=A0 =C2=A0>B.txt

C:\Users= \Juanma>dir *.txt

28/10/2015 =C2=A000:23 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3 A.txt
28/10/2= 015 =C2=A000:23 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 7 B= .txt
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02 arc= hivos =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 10 bytes

--001a11c317e886e61805231e636d-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 12:01:54 2015 Received: (at 18745) by debbugs.gnu.org; 28 Oct 2015 16:01:54 +0000 Received: from localhost ([127.0.0.1]:42727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrTAg-0005sY-7G for submit@debbugs.gnu.org; Wed, 28 Oct 2015 12:01:54 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:52516) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrTAd-0005sO-Jb for 18745@debbugs.gnu.org; Wed, 28 Oct 2015 12:01:52 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NWX00900TRTNT00@a-mtaout20.012.net.il> for 18745@debbugs.gnu.org; Wed, 28 Oct 2015 18:01:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWX009SATV0IB40@a-mtaout20.012.net.il>; Wed, 28 Oct 2015 18:01:49 +0200 (IST) Date: Wed, 28 Oct 2015 18:01:48 +0200 From: Eli Zaretskii Subject: Re: bug#18745: In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83twpb2d8z.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Juanma Barranquero > Date: Wed, 28 Oct 2015 00:24:29 +0100 > Cc: 18745@debbugs.gnu.org > > > Do you see the same result if you invoke 'echo' from the cmd prompt? > > IOW, does this mean Windows 10 changed the behavior of the built-in > > 'echo', and it now removes trailing whitespace from its argument? > > IIUC your question, no > > C:\Users\Juanma>echo A>A.txt > > C:\Users\Juanma>echo B >B.txt > > C:\Users\Juanma>dir *.txt > > 28/10/2015 00:23 3 A.txt > 28/10/2015 00:23 7 B.txt > 2 archivos 10 bytes The test actually uses a batch file, so I think it's worthwhile to try that, and see if the behavior of 'echo' when called from a batch file changed. If not, then please try digging deeper, because the unmodified test work OK for me (not on Windows 10). From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 23:39:31 2015 Received: (at 18745) by debbugs.gnu.org; 29 Oct 2015 03:39:31 +0000 Received: from localhost ([127.0.0.1]:43091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zre3m-0006yh-R1 for submit@debbugs.gnu.org; Wed, 28 Oct 2015 23:39:31 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:36161) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zre3k-0006yY-Cj for 18745@debbugs.gnu.org; Wed, 28 Oct 2015 23:39:28 -0400 Received: by lbjm5 with SMTP id m5so19549336lbj.3 for <18745@debbugs.gnu.org>; Wed, 28 Oct 2015 20:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=BgF3OsR5kEYBs/xSGof5T0zxQU27k75t/xNbr6mY2TQ=; b=FnzkZ+cilDOl/oE37fJkULMmF82owqLg8pK4HPYB7WA2o8nc7hwtacGkzGrz4uIcaR /A7pNMNAXMeY5zX+6xoyV0q1O9bW5Ve6BUbneK73Hh66gMABTPsFkBLUrOqlHm4TtOI+ PNSOyHFSL3MPISkWFUDXkS7yasVfrlr0Bh4dBEE6n8n0u+4VhC1kbknZ9NEsz2Y3MDKf D7wRsgXsukBgonPQj2VTLD3Ve0wi7hChkiZWlm9Bdxf3YqkWsWXjGPjSYNpGuscN3D1b UnqtiW4AQq09ynXAvBGlw5g9kVVq/H6xNAy/1FLYzqm/JiSiOgQGCwM0E6oEK+DjH/m+ CC7g== X-Received: by 10.112.61.226 with SMTP id t2mr24715980lbr.11.1446089967185; Wed, 28 Oct 2015 20:39:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Wed, 28 Oct 2015 20:38:47 -0700 (PDT) In-Reply-To: <83twpb2d8z.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 29 Oct 2015 04:38:47 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a11c3eebcceb58e0523360e4a X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c3eebcceb58e0523360e4a Content-Type: text/plain; charset=UTF-8 On Wed, Oct 28, 2015 at 5:01 PM, Eli Zaretskii wrote: > If not, then please try digging deeper, because the unmodified test > work OK for me (not on Windows 10). Well, mystery solved. It's not a bug or change in Windows 10, it's an incompatibility between CMD.EXE and TCC.EXE (the TakeCommand shell). I usually run everything from inside TakeCommand, so COMSPEC points to TCC.EXE, not CMD.EXE. Not sure how to fix it. I suppose "nothing to do, just run the tests with the right COMSPEC" is an option. OTOH, the test is supposed to check for a CreateProcess "deficiency". And certainly 4DOS/4NT/TCC is a quite popular shell. --001a11c3eebcceb58e0523360e4a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Wed, Oct 28, 2015 at 5:01 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> If no= t, then please try digging deeper, because the unmodified test
> work= OK for me (not on Windows 10).

Well, mystery solv= ed. It's not a bug or change in Windows 10, it's an incompatibility= between CMD.EXE and TCC.EXE (the TakeCommand shell). I usually run everyth= ing from inside TakeCommand, so COMSPEC points to TCC.EXE, not CMD.EXE.

Not sure how to fix it. I suppose "nothing to do= , just run the tests with the right COMSPEC" is an option. OTOH, the t= est is supposed to check for a CreateProcess "deficiency". And ce= rtainly 4DOS/4NT/TCC is a quite popular shell.
--001a11c3eebcceb58e0523360e4a-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 12:19:25 2015 Received: (at 18745) by debbugs.gnu.org; 29 Oct 2015 16:19:25 +0000 Received: from localhost ([127.0.0.1]:44452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrpvB-000324-BD for submit@debbugs.gnu.org; Thu, 29 Oct 2015 12:19:25 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:45422) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zrpuq-00031e-My for 18745@debbugs.gnu.org; Thu, 29 Oct 2015 12:19:23 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NWZ00N00PCIIC00@mtaout26.012.net.il> for 18745@debbugs.gnu.org; Thu, 29 Oct 2015 18:21:16 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWZ00LNXPFG6O20@mtaout26.012.net.il>; Thu, 29 Oct 2015 18:21:16 +0200 (IST) Date: Thu, 29 Oct 2015 18:17:51 +0200 From: Eli Zaretskii Subject: Re: bug#18745: In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <834mh93az4.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Juanma Barranquero > Date: Thu, 29 Oct 2015 04:38:47 +0100 > Cc: 18745@debbugs.gnu.org > > Well, mystery solved. It's not a bug or change in Windows 10, it's an incompatibility between CMD.EXE and TCC.EXE (the TakeCommand shell). I usually run everything from inside TakeCommand, so COMSPEC points to TCC.EXE, not CMD.EXE. > > Not sure how to fix it. I suppose "nothing to do, just run the tests with the right COMSPEC" is an option. OTOH, the test is supposed to check for a CreateProcess "deficiency". And certainly 4DOS/4NT/TCC is a quite popular shell. The CreateProcess deficiency we test there has nothing to do with trailing whitespace, btw. Anyway, does it work to put "ComSpec=%windir%\system32\cmd.exe" into process-environment before running that code? From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 13:23:39 2015 Received: (at 18745) by debbugs.gnu.org; 29 Oct 2015 17:23:40 +0000 Received: from localhost ([127.0.0.1]:44518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrqvL-0004Yq-E4 for submit@debbugs.gnu.org; Thu, 29 Oct 2015 13:23:39 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:36546) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrqvK-0004Yh-3K for 18745@debbugs.gnu.org; Thu, 29 Oct 2015 13:23:38 -0400 Received: by lbjm5 with SMTP id m5so33641088lbj.3 for <18745@debbugs.gnu.org>; Thu, 29 Oct 2015 10:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=4de12YI5k3zZ+1UadNEAnNOtUOFORv50K3CGyNl2dNg=; b=0KdN6yvmKqReIQEpHbuiTD+4EU2eqrbRElNr5o+ARo2h8FwZ236vDXXx5OEVyW4TxT gwCh33hOP+nJgpzZfIeUL2KSA7/MJ+qofLDQuE6dN4HIasR/m8fhHxWFrfHjjz/Sdf2a u9GvIdeFZqKwLN0eLN9ZFv61eSk4SlvhIl6ZUZpL/OpPsFk8n+Tt3LR0w+tnb5a4VVb7 PQGYawi9o9J8SApYgFUzHdakulJIiXz7LOXS9Qo2b0mmMaaE+SJlJgpTgMBlLSk4bV0S JVoxSSgP7IIQXw5DJcLru+S8r457/pwxrLC7gK49mw0DVFSbeSeGGN60n7ncCJ92G5YH BoLg== X-Received: by 10.112.17.34 with SMTP id l2mr1633804lbd.117.1446139417211; Thu, 29 Oct 2015 10:23:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Thu, 29 Oct 2015 10:22:57 -0700 (PDT) In-Reply-To: <834mh93az4.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 29 Oct 2015 18:22:57 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a11c3c47c423a480523419229 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c3c47c423a480523419229 Content-Type: text/plain; charset=UTF-8 On Thu, Oct 29, 2015 at 5:17 PM, Eli Zaretskii wrote: > The CreateProcess deficiency we test there has nothing to do with > trailing whitespace, btw. That's what I meant: that changing the test to accommodate for a TCC incompatibility still would make sense because the trailing space is not what the test is about. Only I said it with less words and zero clarity. > Anyway, does it work to put "ComSpec=%windir%\system32\cmd.exe" into > process-environment before running that code? No. I had already tried that, and now I've done some more checking. (In all cases, I run the test from the shell with emacs -batch -l ert -l process-test [etc]). - Testing from CMD.EXE works (as expected) - Setting COMSPEC to point to CMD and testing from TCC.EXE also works. - let-binding process-environment to (cons "ComSpec=C:\\windows\\system32\\cmd.exe" process-environment) around the test does not work. - Using (setenv "ComSpec" "C:\\Windows\\system32\\cmd.exe") or (setenv "ComSpec" "%windir%\\system32\\cmd.exe" t) in the test function before calling call-process does not work - Same for variants with forward slashes, %windir% vs. explicit path, etc. 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. J --001a11c3c47c423a480523419229 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Oct 29, 2015 at 5:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> The C= reateProcess deficiency we test there has nothing to do with
> traili= ng whitespace, btw.

That's what I meant: that changin= g the test to accommodate for a TCC incompatibility still would make sense = because the trailing space is not what the test is about. Only I said it wi= th less words and zero clarity.

> Anyway, does = it work to put "ComSpec=3D%windir%\system32\cmd.exe" into
>= process-environment before running that code?

No.= I had already tried that, and now I've done some more checking. (In al= l cases, I run the test from the shell with emacs -batch -l ert -l process-= test [etc]).

- Testing from CMD.EXE works (as expe= cted)
- Setting COMSPEC to point to CMD and testing from TCC.EXE = also works.
- let-binding process-environment to (cons "ComS= pec=3DC:\\windows\\system32\\cmd.exe" process-environment) around the = test does not work.
- Using (setenv "ComSpec" "C:\= \Windows\\system32\\cmd.exe") or (setenv "ComSpec" "%wi= ndir%\\system32\\cmd.exe" t) in the test function before calling call-= process does not work
- Same for variants with forward slashes, %= windir% vs. explicit path, etc.

I would be very su= rprised that the process-environment does not affect call-process, so I *mu= st* be missing something obvious. I'll take a closer look as soon as I = have a little more time.

=C2=A0 =C2=A0 J
--001a11c3c47c423a480523419229-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 10:26:20 2015 Received: (at 18745) by debbugs.gnu.org; 30 Oct 2015 14:26:20 +0000 Received: from localhost ([127.0.0.1]:46339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsAdH-000751-Pf for submit@debbugs.gnu.org; Fri, 30 Oct 2015 10:26:20 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:34581) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsAdG-00074u-9T for 18745@debbugs.gnu.org; Fri, 30 Oct 2015 10:26:18 -0400 Received: by lbbwb3 with SMTP id wb3so51715022lbb.1 for <18745@debbugs.gnu.org>; Fri, 30 Oct 2015 07:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=VUXdhdWpDMF0yuQEIYKsoduCW1EYnbBBgMu/pJWDpTE=; b=0NCZ87jLi1pnioDUWEmkQONBolI17IcAV6zniIqdCXFdCEeM1Wj4reN41+PuNW73jx Fk/678TNrF0s+Gn3e9ip2Ks0JllvDl5Tnknn2rO34PnGj2zuz0iTpDFQXJtGK5fpmCFH 0WtSIkOtQJ5bu85XmrJ+Mvs7ztqc/xGc7khGiqVzBu33/+ukEAIMUTB7DvCbdjVUxHHq F+uPmhMfv45rrkil3vNzzbRs/tGlzluwb3Y9/tyiYls6xvaoV+nwmMc+hgAve1yVUixR 9li/jJ09rS2ztgWvQcOenkVGi/6vy4CT8YVEF2I3aA7JuULjRB3UHvZbXSZluLSKEiAS KfUQ== X-Received: by 10.112.234.163 with SMTP id uf3mr4130441lbc.15.1446215177509; Fri, 30 Oct 2015 07:26:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Fri, 30 Oct 2015 07:25:37 -0700 (PDT) In-Reply-To: References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 30 Oct 2015 15:25:37 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a11c317e8eca1590523533536 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c317e8eca1590523533536 Content-Type: text/plain; charset=UTF-8 > 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? --001a11c317e8eca1590523533536 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

> I would be very surprised that the pro= cess-environment does not affect call-process, so I *must* be missing somet= hing obvious. I'll take a closer look as soon as I have a little more t= ime.

OK, now this is freak.

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


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

C:\...\test> type test= .log
TEST=3DAAA
COMSPEC=3DC:\bin64\JPSoft\TCMD\TCC.EXE<= /div>

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

C:\...\test> t= ype test.log
TEST=3DBBB
COMSPEC=3DC:\bin64\JPSoft\TCMD\= TCC.EXE

Is that expected?
--001a11c317e8eca1590523533536-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 10:55:22 2015 Received: (at 18745) by debbugs.gnu.org; 30 Oct 2015 14:55:22 +0000 Received: from localhost ([127.0.0.1]:46343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsB5N-0007kR-G9 for submit@debbugs.gnu.org; Fri, 30 Oct 2015 10:55:22 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:64976) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsB52-0007jf-19 for 18745@debbugs.gnu.org; Fri, 30 Oct 2015 10:55:19 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NX100M00FQ11T00@a-mtaout23.012.net.il> for 18745@debbugs.gnu.org; Fri, 30 Oct 2015 16:54:58 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX100L5SG3MQ0A0@a-mtaout23.012.net.il>; Fri, 30 Oct 2015 16:54:58 +0200 (IST) Date: Fri, 30 Oct 2015 16:55:03 +0200 From: Eli Zaretskii Subject: Re: bug#18745: In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83vb9oz9rs.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Juanma Barranquero > Date: Fri, 30 Oct 2015 15:25:37 +0100 > Cc: 18745@debbugs.gnu.org > > 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? No, but it could be some TCC magic, aimed at intercepting any explicit references to cmd.exe. What happens if you replace test.bat with a compiled C program that calls getenv to look at these two variables -- do you see the same there? (You could use Emacs with a suitable --eval argument to emulate such a "C program".) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 13:10:21 2015 Received: (at 18745) by debbugs.gnu.org; 30 Oct 2015 17:10:21 +0000 Received: from localhost ([127.0.0.1]:46441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsDC1-0004DE-01 for submit@debbugs.gnu.org; Fri, 30 Oct 2015 13:10:21 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34518) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsDBz-0004D6-AD for 18745@debbugs.gnu.org; Fri, 30 Oct 2015 13:10:19 -0400 Received: by lfaz124 with SMTP id z124so36310096lfa.1 for <18745@debbugs.gnu.org>; Fri, 30 Oct 2015 10:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=iNqwGqdUtt4RpDkcCCbBXN4hwUL26XzhtTpcW94O4iw=; b=zK9R6nFfu8Bhsj4/Z+2SAJ0pdQJy7R6SmVcFe8ISKJIsXLpeZgV2DJOPksJNcmgPhI glTbUyQCViKSP1BkNW61puqcf9d/o40B+7vKFYgyZoNF8ft7GlMzkxICf20icFQFtd5b Q5EG5vEkk1hF7pl2flUN+rrilAbxam1CVZgnAGHR/c8KWo3hyolYUc/+9QphV2d/jVxC NL1NgGpyu65GMZM/YfnTOStvgFa/j4WX9KuUyhCCdgYMLsRbkIJEGUnTeG0ValvOJrlS usGzpItM6bwShZosIbyYfsX/OuQ5APrCnKk2XK9wCDhRol2LXe2+lurDQ12VopS1VTrg Vp+w== X-Received: by 10.25.167.2 with SMTP id q2mr2989659lfe.15.1446225018322; Fri, 30 Oct 2015 10:10:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Fri, 30 Oct 2015 10:09:38 -0700 (PDT) In-Reply-To: <83vb9oz9rs.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> <83vb9oz9rs.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 30 Oct 2015 18:09:38 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a113fbdc67b86460523558049 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113fbdc67b86460523558049 Content-Type: text/plain; charset=UTF-8 On Fri, Oct 30, 2015 at 3:55 PM, Eli Zaretskii wrote: > No, but it could be some TCC magic, aimed at intercepting any explicit > references to cmd.exe. I think you're right. Running the let-binding variant under CMD.EXE works as expected (the called process receives the right COMSPEC value). > What happens if you replace test.bat with a compiled C program that > calls getenv to look at these two variables -- do you see the same > there? Both in TCC.EXE and CMD.EXE the let-binding works correctly. I don't think there's anything more to do here, other than perhaps adding a note somewhere that the test doesn't work under TCC. --001a113fbdc67b86460523558049 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Oct 30, 2015 at 3:55 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> No, b= ut it could be some TCC magic, aimed at intercepting any explicit
> r= eferences to cmd.exe.

I think you're right. Running t= he let-binding variant under CMD.EXE works as expected (the called process = receives the right COMSPEC value).

> What happe= ns if you replace test.bat with a compiled C program that
>= ; calls getenv to look at these two variables -- do you see the same
>= ; there?=C2=A0

Both in TCC.EXE and CMD.EXE the= let-binding works correctly.

I don't think th= ere's anything more to do here, other than perhaps adding a note somewh= ere that the test doesn't work under TCC.

--001a113fbdc67b86460523558049-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 16:10:28 2015 Received: (at 18745) by debbugs.gnu.org; 30 Oct 2015 20:10:29 +0000 Received: from localhost ([127.0.0.1]:46532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsG0K-0001uJ-HP for submit@debbugs.gnu.org; Fri, 30 Oct 2015 16:10:28 -0400 Received: from mtaout24.012.net.il ([80.179.55.180]:37027) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsFzy-0001tp-Tk for 18745@debbugs.gnu.org; Fri, 30 Oct 2015 16:10:26 -0400 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NX100L00U8RN100@mtaout24.012.net.il> for 18745@debbugs.gnu.org; Fri, 30 Oct 2015 22:03:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX100AIVUE0Q4A0@mtaout24.012.net.il>; Fri, 30 Oct 2015 22:03:37 +0200 (IST) Date: Fri, 30 Oct 2015 22:10:09 +0200 From: Eli Zaretskii Subject: Re: bug#18745: In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83pozwyv6m.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> <83vb9oz9rs.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Juanma Barranquero > Date: Fri, 30 Oct 2015 18:09:38 +0100 > Cc: 18745@debbugs.gnu.org > > I don't think there's anything more to do here, other than perhaps adding a > note somewhere that the test doesn't work under TCC. If the batch says cmd /c echo arg1 = %1, arg2 = %2 i.e. invokes cmd.exe from the batch file, does the test still fail? If it still fails, I think making the test more tolerant of the trailing whitespace is IMO a better alternative than letting it fail. After all, that trailing space is not what we are testing there. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 19:21:18 2015 Received: (at 18745) by debbugs.gnu.org; 31 Oct 2015 23:21:18 +0000 Received: from localhost ([127.0.0.1]:47368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsfSX-0002Ld-Cw for submit@debbugs.gnu.org; Sat, 31 Oct 2015 19:21:18 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:33352) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsfSV-0002LT-0b for 18745@debbugs.gnu.org; Sat, 31 Oct 2015 19:21:16 -0400 Received: by lfbf136 with SMTP id f136so34603411lfb.0 for <18745@debbugs.gnu.org>; Sat, 31 Oct 2015 16:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=vp7QKV36zhqm7+D1VxyolChlGo4+vmPAVIwUMDdG6oQ=; b=q2ghgnIXeGi9OzMQqK+GAeWs5N9hGEL49HyI3Oc5VG7UCgvcPAJCq3OiniCx/b+EUW +rNETeDR4Bl1Z5iX2hJu6YvHyeJkUGi6VI1VjfXMXsl+4/x+u5dPgEdcOdthxUBMNBb/ 0f6hjTCJL4l3pEOaB7jnklWbZ381ZKwzf5kT86wKss50kYO6OXC/9rDBse3hLsMGBPEp 2wcEDUqgVFy0kUEHwoDwTlD54kaBrf0KKWGec8Z5g+wW2mdZlFgciUAutk906zdQcCZa 3Eo0Mpe5RvfoXnkUt5yVdkK4uub9+qi0pNMCSgjB82gpbi+AjfRsvLIbDYjmTq7hyOPU PD7A== X-Received: by 10.25.10.216 with SMTP id 207mr799596lfk.80.1446333674174; Sat, 31 Oct 2015 16:21:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.217.135 with HTTP; Sat, 31 Oct 2015 16:20:34 -0700 (PDT) In-Reply-To: <83pozwyv6m.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> <83vb9oz9rs.fsf@gnu.org> <83pozwyv6m.fsf@gnu.org> From: Juanma Barranquero Date: Sun, 1 Nov 2015 00:20:34 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a113eb046e0400e05236ecce4 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113eb046e0400e05236ecce4 Content-Type: text/plain; charset=UTF-8 On Fri, Oct 30, 2015 at 9:10 PM, Eli Zaretskii wrote: > If the batch says > > cmd /c echo arg1 = %1, arg2 = %2 > > i.e. invokes cmd.exe from the batch file, does the test still fail? With (with-temp-file batfile (insert "@cmd /c echo arg1 = %1, arg2 = %2\n")) it still works on cmd.exe, fails on tcc.exe > If it still fails, I think making the test more tolerant of the > trailing whitespace is IMO a better alternative than letting it fail. > After all, that trailing space is not what we are testing there. Something like this, you mean? diff --git a/test/automated/process-tests.el b/test/automated/process-tests.el index 1dab615..58a2de7 100644 --- a/test/automated/process-tests.el +++ b/test/automated/process-tests.el @@ -61,15 +61,15 @@ process-test-sentinel-wait-function-working-p ;; to force quoting. (setq batfile (make-temp-file "echo args" nil ".bat")) (with-temp-file batfile - (insert "@echo arg1 = %1, arg2 = %2\n")) + (insert "@echo arg1=%1, arg2=%2\n")) (with-temp-buffer (call-process batfile nil '(t t) t "x &y") - (should (string= (buffer-string) "arg1 = \"x &y\", arg2 = \n"))) + (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n"))) (with-temp-buffer (call-process-shell-command (mapconcat #'shell-quote-argument (list batfile "x &y") " ") nil '(t t) t) - (should (string= (buffer-string) "arg1 = \"x &y\", arg2 = \n")))) + (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n")))) (when batfile (delete-file batfile)))))) (ert-deftest process-test-stderr-buffer () warning: LF will be replaced by CRLF in test/automated/process-tests.el. The file will have its original line endings in your working directory. BTW, curiously, the stderr-related tests in the same test file (process-test-stderr-buffer and process-test-stderr-filter) fail sometimes. Much more frequently on TCC than CMD, but they also fail in CMD, as in these examples: C:\...\automated> ..\..\src\emacs.exe -Q -batch -l ert -l process-tests.elc -f ert-run-tests-batch-and-exit Running 5 tests (2015-10-31 23:35:46+0100) passed 1/5 process-test-quoted-batfile passed 2/5 process-test-sentinel-accept-process-output passed 3/5 process-test-sentinel-sit-for Test process-test-stderr-buffer backtrace: #[nil "\306\307C \310 \311 \3121 \313\216\314 \"\211 )0\202 \210 ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc ert-run-test([cl-struct-ert-test process-test-stderr-buffer nil #[ni ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p ert-run-tests(t #[385 "\306 \307\"\203G \211\211G\310U\203 \211@\20 ert-run-tests-batch(nil) ert-run-tests-batch-and-exit() command-line-1(("-l" "ert" "-l" "process-tests.elc" "-f" "ert-run-te command-line() normal-top-level() Test process-test-stderr-buffer condition: (ert-test-failed ((should (with-current-buffer stderr-buffer (goto-char ...) (looking-at "hello stderr!"))) :form (save-current-buffer (set-buffer stderr-buffer) (goto-char (point-min)) (looking-at "hello stderr!")) :value nil)) FAILED 4/5 process-test-stderr-buffer passed 5/5 process-test-stderr-filter Ran 5 tests, 4 results as expected, 1 unexpected (2015-10-31 23:35:47+0100) 1 unexpected results: FAILED process-test-stderr-buffer C:\...\automated> ..\..\src\emacs.exe -Q -batch -l ert -l process-tests.elc -f ert-run-tests-batch-and-exit Running 5 tests (2015-10-31 23:34:42+0100) passed 1/5 process-test-quoted-batfile passed 2/5 process-test-sentinel-accept-process-output passed 3/5 process-test-sentinel-sit-for passed 4/5 process-test-stderr-buffer Test process-test-stderr-filter backtrace: #[nil "\306\307C \310 \311 \3121 \313\216\314 \"\211 )0\202 \210 ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc ert-run-test([cl-struct-ert-test process-test-stderr-filter nil #[ni ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p ert-run-tests(t #[385 "\306 \307\"\203G \211\211G\310U\203 \211@\20 ert-run-tests-batch(nil) ert-run-tests-batch-and-exit() command-line-1(("-l" "ert" "-l" "process-tests.elc" "-f" "ert-run-te command-line() normal-top-level() Test process-test-stderr-filter condition: (ert-test-failed ((should stderr-sentinel-called) :form stderr-sentinel-called :value nil)) FAILED 5/5 process-test-stderr-filter Ran 5 tests, 4 results as expected, 1 unexpected (2015-10-31 23:34:43+0100) 1 unexpected results: FAILED process-test-stderr-filter --001a113eb046e0400e05236ecce4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Fri, Oct 30, 2015 at 9:10 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> If th= e batch says
>
> =C2=A0 cmd /c echo arg1 =3D %1, arg2 =3D %2>
> i.e. invokes cmd.exe from the batch file, does the test still= fail?

With

=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (with-temp-file batfile
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert "@cmd /c echo arg1 =3D %1,= arg2 =3D %2\n"))

it still works on cmd= .exe, fails on tcc.exe

> If it still fails, I t= hink making the test more tolerant of the
> trailing whitespace is IM= O a better alternative than letting it fail.
> After all, that traili= ng space is not what we are testing there.

Somethi= ng like this, you mean?

diff --git a/test/aut= omated/process-tests.el b/test/automated/process-tests.el
index 1= dab615..58a2de7 100644
--- a/test/automated/process-tests.el
+++ b/test/automated/process-tests.el
@@ -61,15 +61,15 @@ p= rocess-test-sentinel-wait-function-working-p
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0;; to force quoting.
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq batfile (make-temp-file "echo = args" nil ".bat"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(with-temp-file batfile
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(insert "@echo arg1 =3D %1, arg2 =3D %2\n&q= uot;))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(insert = "@echo arg1=3D%1, arg2=3D%2\n"))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-temp-buffer
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(call-process batfile nil '(t t) t &= quot;x &y")
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(should (string=3D (buffer-string) "arg1 =3D \"x &y\&qu= ot;, arg2 =3D \n")))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(should (string=3D (buffer-string) "arg1=3D\"x &= y\", arg2=3D\n")))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(with-temp-buffer
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(call-process-shell-command
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (mapconcat #'shell-quote-argu= ment (list batfile "x &y") " ")
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil '(t t) t)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(should (string=3D (buf= fer-string) "arg1 =3D \"x &y\", arg2 =3D \n"))))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(should (string= =3D (buffer-string) "arg1=3D\"x &y\", arg2=3D\n")))= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when batfile (delete-file ba= tfile))))))
=C2=A0
=C2=A0(ert-deftest process-test-stde= rr-buffer ()
warning: LF will be replaced by CRLF in test/automat= ed/process-tests.el.
The file will have its original line endings= in your working directory.


<= br>
BTW, curiously, the stderr-related tests in the same test fil= e (process-test-stderr-buffer and=C2=A0process-test-stderr-filter) fail som= etimes. Much more frequently on TCC than CMD, but they also fail in CMD, as= in these examples:

C:\...\automated> = ..\..\src\emacs.exe -Q -batch -l ert -l process-tests.elc -f ert-run-tests-= batch-and-exit
Running 5 tests (2015-10-31 23:35:46+0100)
=C2=A0 =C2=A0passed =C2=A01/5 =C2=A0process-test-quoted-batfile
=C2=A0 =C2=A0passed =C2=A02/5 =C2=A0process-test-sentinel-accept-process-= output
=C2=A0 =C2=A0passed =C2=A03/5 =C2=A0process-test-sentinel-= sit-for
Test process-test-stderr-buffer backtrace:
=C2= =A0 #[nil "\306\307C \310 \311 \3121 \313\216\314 =C2=A0 =C2=A0 =C2= =A0\"\211 )0\202 \210
=C2=A0 ert--run-test-internal([cl-str= uct-ert--test-execution-info [cl-struc
=C2=A0 ert-run-test([cl-st= ruct-ert-test process-test-stderr-buffer nil #[ni
=C2=A0 ert-run-= or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
=C2= =A0 ert-run-tests(t #[385 "\306 \307\"\203G \211\211G\310U\203 \= 211@\20
=C2=A0 ert-run-tests-batch(nil)
=C2=A0 ert-run-= tests-batch-and-exit()
=C2=A0 command-line-1(("-l" &quo= t;ert" "-l" "process-tests.elc" "-f" &qu= ot;ert-run-te
=C2=A0 command-line()
=C2=A0 normal-top-l= evel()
Test process-test-stderr-buffer condition:
=C2= =A0 =C2=A0 (ert-test-failed
=C2=A0 =C2=A0 =C2=A0((should
=C2=A0 =C2=A0 =C2=A0 =C2=A0(with-current-buffer stderr-buffer
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(goto-char ...)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(looking-at "hello stderr!")))
=C2= =A0 =C2=A0 =C2=A0 :form
=C2=A0 =C2=A0 =C2=A0 (save-current-buffer=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (set-buffer stderr-buffer)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(point-min))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (looking-at &q= uot;hello stderr!"))
=C2=A0 =C2=A0 =C2=A0 :value nil))
=
=C2=A0 =C2=A0FAILED =C2=A04/5 =C2=A0process-test-stderr-buffer
=C2=A0 =C2=A0passed =C2=A05/5 =C2=A0process-test-stderr-filter

Ran 5 tests, 4 results as expected, 1 unexpected (2015-10-3= 1 23:35:47+0100)

1 unexpected results:
= =C2=A0 =C2=A0FAILED =C2=A0process-test-stderr-buffer


C:\...\automated> ..\..\src\emacs.exe = -Q -batch -l ert -l process-tests.elc -f ert-run-tests-batch-and-exit
=
Running 5 tests (2015-10-31 23:34:42+0100)
=C2=A0 =C2=A0pass= ed =C2=A01/5 =C2=A0process-test-quoted-batfile
=C2=A0 =C2=A0passe= d =C2=A02/5 =C2=A0process-test-sentinel-accept-process-output
=C2= =A0 =C2=A0passed =C2=A03/5 =C2=A0process-test-sentinel-sit-for
= =C2=A0 =C2=A0passed =C2=A04/5 =C2=A0process-test-stderr-buffer
Te= st process-test-stderr-filter backtrace:
=C2=A0 #[nil "\306\= 307C \310 \311 \3121 \313\216\314 =C2=A0 =C2=A0 =C2=A0\"\211 )0\202 = \210
=C2=A0 ert--run-test-internal([cl-struct-ert--test-executio= n-info [cl-struc
=C2=A0 ert-run-test([cl-struct-ert-test process-= test-stderr-filter nil #[ni
=C2=A0 ert-run-or-rerun-test([cl-stru= ct-ert--stats t [[cl-struct-ert-test p
=C2=A0 ert-run-tests(t #[3= 85 "\306 \307\"\203G \211\211G\310U\203 \211@\20
=C2= =A0 ert-run-tests-batch(nil)
=C2=A0 ert-run-tests-batch-and-exit(= )
=C2=A0 command-line-1(("-l" "ert" "-l&= quot; "process-tests.elc" "-f" "ert-run-te
=C2=A0 command-line()
=C2=A0 normal-top-level()
Test= process-test-stderr-filter condition:
=C2=A0 =C2=A0 (ert-test-fa= iled
=C2=A0 =C2=A0 =C2=A0((should stderr-sentinel-called)
=C2=A0 =C2=A0 =C2=A0 :form stderr-sentinel-called :value nil))
=C2=A0 =C2=A0FAILED =C2=A05/5 =C2=A0process-test-stderr-filter
<= br>
Ran 5 tests, 4 results as expected, 1 unexpected (2015-10-31 = 23:34:43+0100)

1 unexpected results:
=C2= =A0 =C2=A0FAILED =C2=A0process-test-stderr-filter

--001a113eb046e0400e05236ecce4-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 01 12:49:43 2015 Received: (at 18745) by debbugs.gnu.org; 1 Nov 2015 17:49:43 +0000 Received: from localhost ([127.0.0.1]:48031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZswlC-0005Bj-W3 for submit@debbugs.gnu.org; Sun, 01 Nov 2015 12:49:43 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:41773) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZswlA-0005BW-4P for 18745@debbugs.gnu.org; Sun, 01 Nov 2015 12:49:41 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NX500L00D0M7100@mtaout24.012.net.il> for 18745@debbugs.gnu.org; Sun, 01 Nov 2015 19:43:02 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX500FRQD7QLC50@mtaout24.012.net.il>; Sun, 01 Nov 2015 19:43:02 +0200 (IST) Date: Sun, 01 Nov 2015 19:49:48 +0200 From: Eli Zaretskii Subject: Re: bug#18745: In-reply-to: X-012-Sender: halo1@inter.net.il To: Juanma Barranquero Message-id: <83fv0py5hf.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> <83vb9oz9rs.fsf@gnu.org> <83pozwyv6m.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18745 Cc: 18745@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Juanma Barranquero > Date: Sun, 1 Nov 2015 00:20:34 +0100 > Cc: 18745@debbugs.gnu.org > > > If it still fails, I think making the test more tolerant of the > > trailing whitespace is IMO a better alternative than letting it fail. > > After all, that trailing space is not what we are testing there. > > Something like this, you mean? Yes, thanks. > BTW, curiously, the stderr-related tests in the same test file > (process-test-stderr-buffer and process-test-stderr-filter) fail sometimes. > Much more frequently on TCC than CMD, but they also fail in CMD, as in these > examples: It doesn't fail for me, even if I run the test many times. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 01 13:30:33 2015 Received: (at 18745-done) by debbugs.gnu.org; 1 Nov 2015 18:30:33 +0000 Received: from localhost ([127.0.0.1]:48077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsxOj-00087N-8y for submit@debbugs.gnu.org; Sun, 01 Nov 2015 13:30:33 -0500 Received: from mail-lf0-f41.google.com ([209.85.215.41]:33580) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsxOh-00084X-5Q for 18745-done@debbugs.gnu.org; Sun, 01 Nov 2015 13:30:31 -0500 Received: by lfbf136 with SMTP id f136so39188430lfb.0 for <18745-done@debbugs.gnu.org>; Sun, 01 Nov 2015 10:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lzkib7MRdkZ1s2GoM2jVbJHZdJfIHIF7Us8x0OgDwF8=; b=h77bTUUOEYUJcakNSrGizJRfgqrnydu6FMY4PevOApDuMsWhc4zv1cbzxHx7n/wUMw IyLXYd5nTdKHmamPor25mHp/9DiwYisf5D+H5Oc3lXfyj8nf3STt6RZuhx5NIVSUMpKw icjJWRBIn/yxiueyHjX6uWpuhT4CAPFq6+qc+ndrCxpGxzT2m7zCQHXbPQ+Z4fwEpjCD fCzl71U9szaGGcU+VRM+sV6MVTJxsieiJXsYozIbQHv7MjH02T+WUtHcQatwVX/HThzA cqCfOy5xqdFUBebmcg+AI6OF/skID+nYXvgpk6ZOsEy25On2n4+T6gRSvEO2LENE9ogC 8w+w== X-Received: by 10.25.167.2 with SMTP id q2mr5459095lfe.15.1446402630352; Sun, 01 Nov 2015 10:30:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.217.132 with HTTP; Sun, 1 Nov 2015 10:29:50 -0800 (PST) In-Reply-To: <83fv0py5hf.fsf@gnu.org> References: <83611s3z0j.fsf@gnu.org> <83twpb2d8z.fsf@gnu.org> <834mh93az4.fsf@gnu.org> <83vb9oz9rs.fsf@gnu.org> <83pozwyv6m.fsf@gnu.org> <83fv0py5hf.fsf@gnu.org> From: Juanma Barranquero Date: Sun, 1 Nov 2015 19:29:50 +0100 Message-ID: Subject: Re: bug#18745: To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a113fbdc6fc06a005237edac8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18745-done Cc: 18745-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113fbdc6fc06a005237edac8 Content-Type: text/plain; charset=UTF-8 On Sun, Nov 1, 2015 at 6:49 PM, Eli Zaretskii wrote: > Yes, thanks. OK, thanks. Installed. I'm re-closing this thread. > It doesn't fail for me, even if I run the test many times. That's interesting. I'll look into it. --001a113fbdc6fc06a005237edac8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sun, Nov 1, 2015 at 6:49 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> Yes, = thanks.

OK, thanks. Installed. I'm re-closing this th= read.

> It doesn't fail for me, even if I r= un the test many times.

That's interesting. I&= #39;ll look into it.

--001a113fbdc6fc06a005237edac8-- From unknown Mon Jun 23 11:27:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 30 Nov 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator