From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.os.cygwin,gmane.emacs.help Subject: Re: Why call-process removes '{' and '}' chars from arguments??? Date: Thu, 03 Jun 2010 10:46:34 +0300 Message-ID: References: <83wruhru5j.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1275551240 25725 80.91.229.12 (3 Jun 2010 07:47:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Jun 2010 07:47:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: cygwin@cygwin.com Original-X-From: cygwin-return-163172-goc-cygwin=m.gmane.org@cygwin.com Thu Jun 03 09:47:19 2010 connect(): No such file or directory Return-path: Envelope-to: goc-cygwin@lo.gmane.org Original-Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1OK58z-0004ZR-4c for goc-cygwin@lo.gmane.org; Thu, 03 Jun 2010 09:47:13 +0200 Original-Received: (qmail 25557 invoked by alias); 3 Jun 2010 07:47:04 -0000 Original-Received: (qmail 25543 invoked by uid 22791); 3 Jun 2010 07:47:02 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Original-Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Jun 2010 07:46:50 +0000 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OK58Z-0004Ng-CS for cygwin@cygwin.com; Thu, 03 Jun 2010 09:46:47 +0200 Original-Received: from 91.193.68.214 ([91.193.68.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Jun 2010 09:46:47 +0200 Original-Received: from gavenko by 91.193.68.214 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Jun 2010 09:46:47 +0200 connect(): No such file or directory Original-Lines: 80 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: <83wruhru5j.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Xref: news.gmane.org gmane.os.cygwin:119238 gmane.emacs.help:73813 Archived-At: On 2010.06.03 0:39, Eli Zaretskii wrote: >> From: Oleksandr Gavenko >> Date: Wed, 02 Jun 2010 23:40:46 +0300 >> >> I use Emacs 23.2 under Windows. >> >> (call-process >> "echo.exe" >> nil (get-buffer "*Messages*") nil >> "--bla" "{rev}" "}}}xxx{1}xxx{2}xxx{{{" ) >> >> put in Message buffer >> >> "--bla rev }}}xxx1xxx2xxx" >> >> so remove occurrences of "{" and "}". Why??? > > I cannot reproduce this in Emacs 23.2 on MS-Windows. I get the > expected result: > > --bla {rev} }}}xxx{1}xxx{2}xxx{{{ > > What kind of port of which program is your echo.exe? What happens if > you invoke the same command from the shell? > Futher info: I wrote simple C prog - printarg.c with: int main(int argc, char **argv) { for (int i = 0; i < argc; i++) printf("\"%s\"\n", argv[i]); return 0; } When I compile it with CC=gcc # resulted executable depend on cygwin1.dll (call-process "printarg.exe" nil (get-buffer "*Messages*") nil "--bla" "{rev}" "}}}xxx{1}xxx{2}xxx{{{" ) return "/home/user/usr/bin/printarg" "--bla" "rev" "}}}xxx1xxx2xxx" When I compile it with CC=i686-pc-cygwin-gcc-3 -mno-cygwin # resulted executable *NOT* depend on cygwin1.dll call-process return "d:\home\usr\bin\printarg.exe" "--bla" "{rev}" "}}}xxx{1}xxx{2}xxx{{{" Also interesting that from Cygwin bash argument successful passed to printarg: bash# ldd `which printarg` ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll cygwin1.dll => /usr/bin/cygwin1.dll ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll bash# printarg {}{}{{{{}}}{}}}{{} {rev} "printarg" "{}{}{{{{}}}{}}}{{}" "{rev}" GNU Emacs 23.2 from ftp.gnu.org - release build with mingw.