unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
To: cygwin@cygwin.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Why call-process removes '{' and '}' chars from arguments???
Date: Thu, 03 Jun 2010 11:04:53 -0400	[thread overview]
Message-ID: <4C07C495.7040709@cygwin.com> (raw)
In-Reply-To: <hu7mkr$p04$1@dough.gmane.org>

On 6/3/2010 3:46 AM, Oleksandr Gavenko wrote:
> On 2010.06.03 0:39, Eli Zaretskii wrote:
>>> From: Oleksandr Gavenko<gavenkoa@gmail.com>
>>> 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.

See <http://cygwin.com/cygwin-ug-net/using-cygwinenv.html> and try setting
the CYGWIN environment variable to include "noglob".

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?


  reply	other threads:[~2010-06-03 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 20:40 Why call-process removes '{' and '}' chars from arguments??? Oleksandr Gavenko
2010-06-02 21:39 ` Eli Zaretskii
2010-06-03  7:46   ` Oleksandr Gavenko
2010-06-03 15:04     ` Larry Hall (Cygwin) [this message]
2010-06-03 20:33       ` Oleksandr Gavenko
2010-06-04  8:56         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C07C495.7040709@cygwin.com \
    --to=reply-to-list-only-lh@cygwin.com \
    --cc=cygwin@cygwin.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).