X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0	tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org, cygwin@cygwin.com
In-reply-to: <hu93ji$6d7$1@dough.gmane.org> (message from Oleksandr Gavenko on	Thu, 03 Jun 2010 23:33:44 +0300)
Subject: Re: Why call-process removes '{' and '}' chars from arguments???
References: <hu6fkl$h98$1@dough.gmane.org> <83wruhru5j.fsf@gnu.org>	<hu7mkr$p04$1@dough.gmane.org> <4C07C495.7040709@cygwin.com> <hu93ji$6d7$1@dough.gmane.org>
Message-Id: <E1OKShY-0005pd-4K@fencepost.gnu.org>
Date: Fri, 04 Jun 2010 04:56:28 -0400
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Thu, 03 Jun 2010 23:33:44 +0300
> Cc: cygwin@cygwin.com
> 
> %* in .bat file not proper work - it strip all chars after
> first new line occurrence.
> 
> I think in Windows there are no anything scriptable with
> "$*" like in POSIX sh.

Yes, there is: it's %*.  The problem is that the Windows shells do not
support command lines with embedded newlines at all.

> To workaround this I create executable
> which linked with Cygwin runtime and as in BusyBox
> to 'execvp' passed base name as command and all args without
> changes. Cygwin 'execvp' first search for 'prog' then
> for 'prog.exe' so trick worked!
> 
> So I switch from simple .bat wrapper to
> special executable. To enable another Cygwin script 'foo'
> for Emacs I just copy existing executable:
> 
>    $ cp hg.exe foo.exe

Mixing the native Windows build of Emacs with Cygwin is asking for
trouble.  I expect you to see more surprises down the line.  I highly
recommend to install the Cygwin build of Emacs and use that instead.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

