From unknown Sun Jun 22 11:31:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6674 <6674@debbugs.gnu.org> To: bug#6674 <6674@debbugs.gnu.org> Subject: Status: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS Reply-To: bug#6674 <6674@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:31:04 +0000 retitle 6674 PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS reassign 6674 emacs submitter 6674 =C3=93scar Fuentes severity 6674 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 23:50:45 2010 Received: (at submit) by debbugs.gnu.org; 20 Jul 2010 03:50:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ob3qu-0005kg-VO for submit@debbugs.gnu.org; Mon, 19 Jul 2010 23:50:45 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ob3qs-0005kY-6r for submit@debbugs.gnu.org; Mon, 19 Jul 2010 23:50:43 -0400 Received: from lists.gnu.org ([199.232.76.165]:44957) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ob3rE-0001fG-RN for submit@debbugs.gnu.org; Mon, 19 Jul 2010 23:51:04 -0400 Received: from [140.186.70.92] (port=34600 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ob3rD-0003c0-Em for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 23:51:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ob3rC-00026z-3y for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 23:51:03 -0400 Received: from impaqm3.telefonica.net ([213.4.138.3]:26695) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ob3rB-00026b-TJ for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2010 23:51:02 -0400 Received: from IMPmailhost4.adm.correo ([10.20.102.125]) by IMPaqm3.telefonica.net with bizsmtp id k3pc1e00o2iL0W23P3pcVd; Tue, 20 Jul 2010 05:49:36 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost4.adm.correo with BIZ IMP id k3pb1e0083hRxRf1k3pc7w; Tue, 20 Jul 2010 05:49:36 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: bug-gnu-emacs@gnu.org Subject: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS Date: Tue, 20 Jul 2010 05:49:35 +0200 Message-ID: <878w564xtc.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) On Windows, when find-program points to a GNU-compatible `find' executable, grep-find-use-xargs is assigned the symbol 'gnu. The consequence of this is that `rgrep' ends building a command that contains a pipe: find | xargs -0 grep This ends with `find' reporting confusing errors about wrong arguments. An extra test is added to the assigment of grep-find-use-xargs to force the value 'exec on Windows and MS-DOS. 2010-07-20 =C3=93scar Fuentes * progmodes/grep.el: (grep-compute-defaults): always assign 'exec to grep-find-use-xargs on Windows and MS-DOS. =3D=3D=3D modified file 'lisp/progmodes/grep.el' *** lisp/progmodes/grep.el 2010-05-21 20:43:04 +0000 --- lisp/progmodes/grep.el 2010-07-20 03:42:21 +0000 *************** Set up `compilation-exit-message-functio *** 552,557 **** --- 552,560 ---- (unless grep-find-use-xargs (setq grep-find-use-xargs (cond + ;; We don't want a shell pipe on those systems: + ((or (eq system-type 'windows-nt) (eq system-type 'ms-dos)) + 'exec) ((and (grep-probe find-program `(nil nil nil ,null-device "-print0")) (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo"))) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 08:57:02 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 12:57:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObCNZ-0001v3-H0 for submit@debbugs.gnu.org; Tue, 20 Jul 2010 08:57:02 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObCNY-0001uy-IE for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 08:57:01 -0400 Received: by bwz7 with SMTP id 7so3194882bwz.3 for <6674@debbugs.gnu.org>; Tue, 20 Jul 2010 05:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=vuoU/zf8mjanxHAohFFZf3s8BsQjQIGKe7VrbevHhIs=; b=MJTKB7xMJBFyrYqA/Cnn9RyO3dBpf7ULY1+ctGR7etZ9CROZgCE4SXXCFwJk371aHb 5mN3sj8RYU6MEeMOpY763gSXat2BnshIMbRHbE68Ok3PyNUzMVWUB1t+DqhEPPoybbCQ PN2yezVQu3okqZvkVFKC2EUZj4DaphlGt52yM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=FGw4zyO1K42ib9flmM5/6CG5piDlS1VCsR0P7Wh8kNQuiz1b5kVRAv7vyF7PXQlvPM BOcI1pE/B7TKG89lS3LXLRB7gXT7bMmEK0gbJS3Ac3Og8ht3KT/lIFWVycMSzTYu/nZN 4KohXDk+oQk+65fcJdf0Z1xsUux/CSTc949ts= Received: by 10.204.81.130 with SMTP id x2mr5059697bkk.210.1279630643340; Tue, 20 Jul 2010 05:57:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Tue, 20 Jul 2010 05:57:03 -0700 (PDT) In-Reply-To: <878w564xtc.fsf@telefonica.net> References: <878w564xtc.fsf@telefonica.net> From: Juanma Barranquero Date: Tue, 20 Jul 2010 14:57:03 +0200 Message-ID: Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS To: =?UTF-8?Q?=C3=93scar_Fuentes?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) 2010/7/20 =C3=93scar Fuentes : > On Windows, when find-program points to a GNU-compatible `find' > executable, grep-find-use-xargs is assigned the symbol 'gnu. The > consequence of this is that `rgrep' ends building a command that > contains a pipe: find | xargs -0 grep This ends with > `find' reporting confusing errors about wrong arguments. Yes, I get c:/gnu/bin/find.exe: invalid predicate `-nam' but the very same command works from the command line. So the right thing would be to fix how rgrep invokes the command on Windows, wouldn't it? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 09:39:21 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 13:39:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObD2W-0002DU-Re for submit@debbugs.gnu.org; Tue, 20 Jul 2010 09:39:21 -0400 Received: from impaqm1.telefonica.net ([213.4.138.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObD2T-0002DP-UQ for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 09:39:19 -0400 Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm1.telefonica.net with bizsmtp id k9ZG1e00D2kvMAa01DfgNQ; Tue, 20 Jul 2010 15:39:40 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost6.adm.correo with BIZ IMP id kDff1e00F3hRxRf1mDffUT; Tue, 20 Jul 2010 15:39:40 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar?= Fuentes To: Juanma Barranquero Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> Date: Tue, 20 Jul 2010 15:39:39 +0200 In-Reply-To: (Juanma Barranquero's message of "Tue, 20 Jul 2010 14:57:03 +0200") Message-ID: <87vd8a2rxg.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Juanma Barranquero writes: > Yes, I get > > c:/gnu/bin/find.exe: invalid predicate `-nam' This is, most likely, a command-line lenght issue. Do C-u M-x rgrep and enter the same parameters. When Emacs displays the command to be executed on the minibuffer, insert an extra space between some of the first parameters. Then the problem becomes c:/gnu/bin/find.exe: invalid predicate `-na' > but the very same command works from the command line. So the right > thing would be to fix how rgrep invokes the command on Windows, > wouldn't it? Agreed. That's a symptom of a more general problem. I have no idea of what's going on, because if the pipe is not used the command line for `find' is similar on length and the problem doesn't happen. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 10:24:41 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 14:24:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObDkP-0002Xc-0H for submit@debbugs.gnu.org; Tue, 20 Jul 2010 10:24:41 -0400 Received: from impaqm3.telefonica.net ([213.4.138.3]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObDkM-0002XX-3e for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 10:24:39 -0400 Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm3.telefonica.net with bizsmtp id k9GZ1e00r2jdgqJ3PER13M; Tue, 20 Jul 2010 16:25:01 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost5.adm.correo with BIZ IMP id kER01e0063hRxRf1lER0qN; Tue, 20 Jul 2010 16:25:01 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar?= Fuentes To: Juanma Barranquero Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> Date: Tue, 20 Jul 2010 16:24:59 +0200 In-Reply-To: <87vd8a2rxg.fsf@telefonica.net> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Tue, 20 Jul 2010 15:39:39 +0200") Message-ID: <87r5iy2ptw.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) =C3=93scar Fuentes writes: > Agreed. That's a symptom of a more general problem. I have no idea of > what's going on, because if the pipe is not used the command line for > `find' is similar on length and the problem doesn't happen. Pasting the command on cmd.exe works fine (after replacing / with \ on the path to `find.exe') Executing cmd.exe -c from cmd.exe fails on a similar way: "CS" -o -path "*" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable. This looks like a can of worms. Can we apply the patch on the original post, so `rgrep' is usable on Windows with the minimal fuss? From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 11:28:48 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 15:28:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObEkR-000301-RT for submit@debbugs.gnu.org; Tue, 20 Jul 2010 11:28:47 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObEkQ-0002zv-V1 for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 11:28:47 -0400 Received: by bwz7 with SMTP id 7so3317624bwz.3 for <6674@debbugs.gnu.org>; Tue, 20 Jul 2010 08:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=EIq5dzh1z+T1zR2DQYQ/5TsHQ9sXnuwK4nH8btE0tyM=; b=EZMrtMgipoVC6V4FalpKQrBYVedlfmAWUbWq8649IzAerSh7VEJGUmMhBn3Of2NLwp 42qiDmuh0O05LN9JregrVIOtomboyvkyjEsKgdrWNgg/++h9710NPdsiHPFTT2B+kZ42 0Ww7j4gHgkwEMbuRaX1d99TH04uKIiVKQSuws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=jSA0cPgPj/mjQzvmVTY8m4Ko3aDgsG3Ke98IWdZnoup7h9MoEeofvfIBjg4LimdK7C RxJVPC1lC3gciRpjk5j2hn2NNtz0/RdmL7loShj9N9Ca5rFg+0LZo+o4gR6jvH99XMeI yKMNfDjBtGJ1fCXp/5PIiBkF+Sj7MZ7IZ5Sn8= Received: by 10.204.130.146 with SMTP id t18mr2358994bks.61.1279639145152; Tue, 20 Jul 2010 08:19:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Tue, 20 Jul 2010 08:18:45 -0700 (PDT) In-Reply-To: <87r5iy2ptw.fsf@telefonica.net> References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> From: Juanma Barranquero Date: Tue, 20 Jul 2010 17:18:45 +0200 Message-ID: Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS To: =?UTF-8?Q?=C3=93scar_Fuentes?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On Tue, Jul 20, 2010 at 16:24, =C3=93scar Fuentes wrote: > This looks like a can of worms. Can we apply the patch on the original > post, so `rgrep' is usable on Windows with the minimal fuss? Let's wait for other people's comments, but if you commit that fix, at the very least I'd suggest adding a big comment stating clearly that this is a workaround and the underlying bug is neither well understood nor fixed. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 12:46:23 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 16:46:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObFxX-0003Xm-79 for submit@debbugs.gnu.org; Tue, 20 Jul 2010 12:46:23 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObFxU-0003Xh-68 for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 12:46:21 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L5V007007UIVV00@a-mtaout23.012.net.il> for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 19:46:34 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5V006F47XL1980@a-mtaout23.012.net.il>; Tue, 20 Jul 2010 19:46:34 +0300 (IDT) Date: Tue, 20 Jul 2010 19:46:33 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <878w564xtc.fsf@telefonica.net> To: =?UTF-8?Q?=C3=93scar?= Fuentes Message-id: <83zkxmcd92.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > From: =C3=93scar Fuentes > Date: Tue, 20 Jul 2010 05:49:35 +0200 > Cc:=20 >=20 > On Windows, when find-program points to a GNU-compatible `find' > executable, grep-find-use-xargs is assigned the symbol 'gnu. The > consequence of this is that `rgrep' ends building a command that > contains a pipe: find | xargs -0 grep This ends with > `find' reporting confusing errors about wrong arguments. >=20 > An extra test is added to the assigment of grep-find-use-xargs to f= orce > the value 'exec on Windows and MS-DOS. I saw this problem on MS-Windows and intended to look into it. But one thing is certain: the MS-DOS build does not need this patch, it works just fine with the original command line that includes the pipe to xargs. > + =09=09 ((or (eq system-type 'windows-nt) (eq system-type 'ms-dos)= ) What's wrong with memq? From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 12:55:59 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 16:55:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObG6o-0003bl-To for submit@debbugs.gnu.org; Tue, 20 Jul 2010 12:55:59 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObG6l-0003be-S8 for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 12:55:57 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L5V008008DQ8X00@a-mtaout23.012.net.il> for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 19:56:19 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5V004JH8DTMBB0@a-mtaout23.012.net.il>; Tue, 20 Jul 2010 19:56:19 +0300 (IDT) Date: Tue, 20 Jul 2010 19:56:18 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <87r5iy2ptw.fsf@telefonica.net> To: =?UTF-8?Q?=C3=93scar?= Fuentes Message-id: <83wrsqccst.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 6674 Cc: lekktu@gmail.com, 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > From: =C3=93scar Fuentes > Date: Tue, 20 Jul 2010 16:24:59 +0200 > Cc: 6674@debbugs.gnu.org >=20 > =C3=93scar Fuentes writes: >=20 > > Agreed. That's a symptom of a more general problem. I have no ide= a of > > what's going on, because if the pipe is not used the command line= for > > `find' is similar on length and the problem doesn't happen. >=20 > Pasting the command on cmd.exe works fine (after replacing / with \= on > the path to `find.exe') >=20 > Executing >=20 > cmd.exe -c >=20 > from cmd.exe fails on a similar way: >=20 > "CS" -o -path "*" no se reconoce como un comando interno o externo, > programa o archivo por lotes ejecutable. Can someone find out what is the command length limit beyond which th= e command starts to fail? My guess would be that the problem is in cmdproxy, btw. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 13:27:44 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 17:27:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObGbY-0003pX-HH for submit@debbugs.gnu.org; Tue, 20 Jul 2010 13:27:44 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObGbU-0003pS-Tl for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 13:27:42 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L5V006009T6PT00@a-mtaout22.012.net.il> for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 20:28:04 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5V00M6Z9URUYH0@a-mtaout22.012.net.il>; Tue, 20 Jul 2010 20:28:04 +0300 (IDT) Date: Tue, 20 Jul 2010 20:28:04 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <87r5iy2ptw.fsf@telefonica.net> To: =?UTF-8?Q?=C3=93scar?= Fuentes Message-id: <83vd8acbbv.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 6674 Cc: lekktu@gmail.com, 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > From: =C3=93scar Fuentes > Date: Tue, 20 Jul 2010 16:24:59 +0200 > Cc: 6674@debbugs.gnu.org >=20 > =C3=93scar Fuentes writes: >=20 > > Agreed. That's a symptom of a more general problem. I have no ide= a of > > what's going on, because if the pipe is not used the command line= for > > `find' is similar on length and the problem doesn't happen. >=20 > Pasting the command on cmd.exe works fine (after replacing / with \= on > the path to `find.exe') >=20 > Executing >=20 > cmd.exe -c >=20 > from cmd.exe fails on a similar way: >=20 > "CS" -o -path "*" no se reconoce como un comando interno o externo, > programa o archivo por lotes ejecutable. >=20 > This looks like a can of worms. Can we apply the patch on the origi= nal > post, so `rgrep' is usable on Windows with the minimal fuss? I see the problem. When the command line includes pipes or redirection, cmdproxy calls cmd.exe to do the job. It does so by invoking the `spawn' function. By trial and error I established that the limit beyond which rgrep fails is 1024 characters. This is consistent with the MSDN documentation of _spawn, e.g. http://msdn.microsoft.com/en-us/library/20y988d2(VS.71).aspx which says: To pass arguments to the new process, give one or more pointers to character strings as arguments in the _spawn call. These character strings form the argument list for the spawned process. The combine= d length of the strings forming the argument list for the new process must not exceed 1024 bytes. [...] Strangely, we use the same _spawn to run commands when there's no pipes or redirection. Perhaps the 1024-character limit is only imposed when cmd.exe is invoked. In general, cmd.exe itself is documented to have a much larger limit on command-line length: 8K on Windows XP. So we could either (1) install =C3=93scar's patch, with the disadvant= age that rgrep will be slower on MS-Windows (because a separate Grep is invoked on each file found by Find), or (2) fix cmdproxy to use a better API, such as CreateProcess, which doesn't have this limitation= . In any case, please do NOT install the patch for the MS-DOS build. A= s I wrote earlier, it does not have this problem. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 13:42:41 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 17:42:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObGq1-0003x6-4v for submit@debbugs.gnu.org; Tue, 20 Jul 2010 13:42:41 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObGpy-0003wz-QN for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 13:42:39 -0400 Received: by bwz7 with SMTP id 7so3419181bwz.3 for <6674@debbugs.gnu.org>; Tue, 20 Jul 2010 10:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=VU2cyPXP+P87ks46s+gsRWo6Uy5MRQfZ26ee3iowgW4=; b=uASvdsrgbOmdOOieYMqvxW8VBTJCZPkBOMNhqu9U9iqzMSelKn5a3mg5yhNBh4wdWf FlcnHT2w7mefJH/VqGRtUmR0kip74lBN6JIiX5RGzUJGATWjWHN/uzB20afrj4hly3tS SXESMC9W8u6AAnZ62Hwpw/RFvA78S9JIUkRVc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=dl80MiGVWATwFOjEsCMMnQAkxvD5qJ6nMjssKCWC9DZs/byXx/H2tQ4UQczr0p5Il8 0MHI5Xai1jbqoOC9msgFInpKTSY/fFIqd8Z7HCaKXUf+U9kYpwcQlmlaEcq0YDEMZOb1 J32zSkv3tcQPv5Qp2cUrFyQsDkZezbljuHTs8= Received: by 10.204.81.130 with SMTP id x2mr5332703bkk.210.1279647782220; Tue, 20 Jul 2010 10:43:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Tue, 20 Jul 2010 10:42:42 -0700 (PDT) In-Reply-To: <83vd8acbbv.fsf@gnu.org> References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> From: Juanma Barranquero Date: Tue, 20 Jul 2010 19:42:42 +0200 Message-ID: Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6674 Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On Tue, Jul 20, 2010 at 19:28, Eli Zaretskii wrote: > or (2) fix cmdproxy to use a > better API, such as CreateProcess, which doesn't have this limitation. I think we should do this, unless there's a pressing need to commit a fix A= SAP. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 15:51:19 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 19:51:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObIqV-0004q8-DF for submit@debbugs.gnu.org; Tue, 20 Jul 2010 15:51:19 -0400 Received: from impaqm2.telefonica.net ([213.4.138.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObIqT-0004q2-Br for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 15:51:18 -0400 Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm2.telefonica.net with bizsmtp id kKRV1e00G2h2L9m3MKrhRW; Tue, 20 Jul 2010 21:51:41 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost3.adm.correo with BIZ IMP id kKrf1e00H3hRxRf1jKrgMJ; Tue, 20 Jul 2010 21:51:41 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar?= Fuentes To: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> Date: Tue, 20 Jul 2010 21:51:39 +0200 In-Reply-To: <83vd8acbbv.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Jul 2010 20:28:04 +0300") Message-ID: <87eiey2apg.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 Cc: lekktu@gmail.com, 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Eli Zaretskii writes: [snip] > By trial and error I established that the limit beyond which rgrep > fails is 1024 characters. This is consistent with the MSDN > documentation of _spawn, e.g. [snip] > So we could either (1) install =C3=93scar's patch, with the disadvantage > that rgrep will be slower on MS-Windows (because a separate Grep is > invoked on each file found by Find), or (2) fix cmdproxy to use a > better API, such as CreateProcess, which doesn't have this limitation. cmdproxy.c does not call the C runtime `_spawn' function. It defines its own `spawn' that calls CreateProcess. The issue is that "cmd.exe -c" seems to have a 1024 char limit when the command contains a pipe (my guess is that the limit applies separatelly to every command on the pipe chain) and cmdproxy.c prepends "cmd.exe -c" to the command when it has a pipe, redirection, etc. > In any case, please do NOT install the patch for the MS-DOS build. As > I wrote earlier, it does not have this problem. Okay. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 17:42:38 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 21:42:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObKaD-0005bO-OZ for submit@debbugs.gnu.org; Tue, 20 Jul 2010 17:42:38 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObKaB-0005bH-LX for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 17:42:36 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L5V00300LFWHG00@a-mtaout20.012.net.il> for 6674@debbugs.gnu.org; Wed, 21 Jul 2010 00:41:31 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5V00LUTLL02VH0@a-mtaout20.012.net.il>; Wed, 21 Jul 2010 00:41:31 +0300 (IDT) Date: Wed, 21 Jul 2010 00:41:23 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <87eiey2apg.fsf@telefonica.net> To: =?utf-8?Q?=C3=93scar?= Fuentes Message-id: <83tyntde64.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 6674 Cc: lekktu@gmail.com, 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > From: =C3=93scar Fuentes > Cc: lekktu@gmail.com, 6674@debbugs.gnu.org > Date: Tue, 20 Jul 2010 21:51:39 +0200 >=20 > The issue is that "cmd.exe -c" seems to have a 1024 char limit when= the > command contains a pipe (my guess is that the limit applies separat= elly > to every command on the pipe chain) and cmdproxy.c prepends "cmd.ex= e -c" > to the command when it has a pipe, redirection, etc. If that is true, we could implement the pipes in cmdproxy. It's not difficult. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 18:19:01 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 22:19:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObL9R-0005r4-GV for submit@debbugs.gnu.org; Tue, 20 Jul 2010 18:19:01 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObL9P-0005qz-0I for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 18:19:00 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L5V00I00N4XIZ00@a-mtaout23.012.net.il> for 6674@debbugs.gnu.org; Wed, 21 Jul 2010 01:18:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5V00IDANBIBO20@a-mtaout23.012.net.il>; Wed, 21 Jul 2010 01:18:55 +0300 (IDT) Date: Wed, 21 Jul 2010 01:18:55 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <83tyntde64.fsf@gnu.org> To: ofv@wanadoo.es, lekktu@gmail.com, 6674@debbugs.gnu.org Message-id: <83sk3ddcfk.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <83tyntde64.fsf@gnu.org> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 6674 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > Date: Wed, 21 Jul 2010 00:41:23 +0300 > From: Eli Zaretskii > Cc: lekktu@gmail.com, 6674@debbugs.gnu.org >=20 > > From: =C3=93scar Fuentes > > Cc: lekktu@gmail.com, 6674@debbugs.gnu.org > > Date: Tue, 20 Jul 2010 21:51:39 +0200 > >=20 > > The issue is that "cmd.exe -c" seems to have a 1024 char limit wh= en the > > command contains a pipe (my guess is that the limit applies separ= atelly > > to every command on the pipe chain) and cmdproxy.c prepends "cmd.= exe -c" > > to the command when it has a pipe, redirection, etc. >=20 > If that is true, we could implement the pipes in cmdproxy. It's no= t > difficult. A better (and easier implemented) idea would be to create a temporary batch file with the command line and run the batch file with cmd.exe. The original command works just fine if invoked from a batch file. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 19:18:30 2010 Received: (at 6674) by debbugs.gnu.org; 20 Jul 2010 23:18:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObM50-0006G2-3k for submit@debbugs.gnu.org; Tue, 20 Jul 2010 19:18:30 -0400 Received: from impaqm5.telefonica.net ([213.4.138.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObM4w-0006Fw-QT for 6674@debbugs.gnu.org; Tue, 20 Jul 2010 19:18:27 -0400 Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm5.telefonica.net with bizsmtp id kP8G1e0042h2L9m3RPJg94; Wed, 21 Jul 2010 01:18:40 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost3.adm.correo with BIZ IMP id kPJe1e0043hRxRf1jPJfuB; Wed, 21 Jul 2010 01:18:39 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: 6674@debbugs.gnu.org Subject: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows Date: Wed, 21 Jul 2010 01:18:38 +0200 Message-ID: <871vax3fox.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 Cc: lekktu@gmail.com, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) rgrep is broken on Windows. Although it is obvious that a general fix for the shell issue is the most correct resolution for this bug, I propose to apply the patch below and revert it once cmdproxy.c is enhanced for dealing with the problem. Otherwise, a workaround is to add (setq grep-find-use-xargs 'exec) to the user's .emacs file. 2010-07-21 =C3=93scar Fuentes * progmodes/grep.el (grep-compute-defaults): always assign 'exec to grep-find-use-xargs on Windows. =3D=3D=3D modified file 'lisp/progmodes/grep.el' *** lisp/progmodes/grep.el 2010-01-31 21:47:47 +0000 --- lisp/progmodes/grep.el 2010-07-20 23:04:56 +0000 *************** Set up `compilation-exit-message-functio *** 552,557 **** --- 552,561 ---- (unless grep-find-use-xargs (setq grep-find-use-xargs (cond + ;; Windows' shell has problems with long commands and + ;; pipes. See bug #6674. + ((eq system-type 'windows-nt) + 'exec) ((and (grep-probe find-program `(nil nil nil ,null-device "-print0")) (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo"))) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 20:38:22 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 00:38:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNKG-0006o1-W1 for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:38:21 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNKF-0006nw-2w for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:38:19 -0400 Received: from lists.gnu.org ([199.232.76.165]:48727) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObNKe-0003zb-94 for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:38:44 -0400 Received: from [140.186.70.92] (port=58834 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObNKd-0007iB-3P for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:38:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObNKb-0007Ji-Q8 for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:38:42 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:51128) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNKb-0007JW-Ks; Tue, 20 Jul 2010 20:38:41 -0400 Received: by gxk4 with SMTP id 4so4189010gxk.0 for ; Tue, 20 Jul 2010 17:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=chqrbmK4OnUmp8PoFGWN0delwNoF/zwUeDdhjv0VeP0=; b=qHMFDFoghzffjj0wy+192IfXEY8L2UkwHqwk8Jl+EEJhXc2f8+oK/dUkW9ls8NXAlj m5vI8ZqPxc1lZhs/z5mmWbjptt9IwMcpZkFfAXGpn1l/K+9Dw2s38tEV/nHSwVMyaZMx /FpO0qBsEBxefMaPteJoPf2Q6PyPdU1m6x9HE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Jy2P4KKIZg/iAFSZrVOujJBQJjIaMeNUkyK07WlndcQvQoAXWS0v0fk2pWpTFUMCUu bO9d6qxxsHmaC4/mNgbXHpJYZrC33+Ml2S0FIHXY5WtBfQSTm6RBb5yvdu2uId1JgDQh mSjnj7iUdv0Hr2asJho7DHLL5etFcfBPbUeDM= Received: by 10.100.151.4 with SMTP id y4mr7416869and.247.1279672719944; Tue, 20 Jul 2010 17:38:39 -0700 (PDT) Received: from [192.168.1.5] (97-122-118-250.hlrn.qwest.net [97.122.118.250]) by mx.google.com with ESMTPS id d1sm78392537anc.39.2010.07.20.17.38.37 (version=SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 17:38:39 -0700 (PDT) Message-ID: <4C464188.8080901@gmail.com> Date: Tue, 20 Jul 2010 18:38:32 -0600 From: Christoph User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org, Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <83tyntde64.fsf@gnu.org> <83sk3ddcfk.fsf@gnu.org> In-Reply-To: <83sk3ddcfk.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) On 7/20/2010 4:18 PM, Eli Zaretskii wrote: > A better (and easier implemented) idea would be to create a temporary > batch file with the command line and run the batch file with cmd.exe. > The original command works just fine if invoked from a batch file. Out of curiosity, why is a batch file solution better than enhancing cmdproxy? Christoph From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 20:44:40 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 00:44:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNQO-0006r1-5N for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:44:40 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNQL-0006qv-Mb for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:44:38 -0400 Received: from lists.gnu.org ([199.232.76.165]:56198) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObNQk-00045m-TK for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:45:02 -0400 Received: from [140.186.70.92] (port=55202 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObNQi-0008CQ-O2 for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:45:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObNQh-00089D-PH for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:45:00 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:44105) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNQh-000896-Id; Tue, 20 Jul 2010 20:44:59 -0400 Received: by gwb1 with SMTP id 1so3986911gwb.0 for ; Tue, 20 Jul 2010 17:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=Ig3c0pIK4xAygY0DSjfvKkri9+dbc5KKUsA58VDuiIs=; b=GHvydE1B6XUVWzDJZyk2ZbT9T9KWmArE6BlSnTFzDi2bK7S2buDndcnp3vbf+62FTV Kmt6rktRSkScaWg9JoQURehU60VaG9LCpJK06Gs4glL6IAvyNitwaB6JnO1PZkUnISyt r2unmTLlhgDsBqAJgg0wzrUjIoTUobBLOiK9I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=wqizRERX3necIEwGlwwqrrtRnhUOECyuulOgT8x0IEZp6XSc/AyYwJSjPxPuNWnPu4 iIV9fhiiRhM5mo9NuxVugwEJvvyu0ZbO4BHiyIDTx7lV6w/Z2vB/0+SnZApJGIZ1Ne/C zQIBFzB0pgbycm/A9SU0atVPw42lJpzqnlGns= Received: by 10.101.171.35 with SMTP id y35mr7302155ano.250.1279673098742; Tue, 20 Jul 2010 17:44:58 -0700 (PDT) Received: from [192.168.1.5] (97-122-118-250.hlrn.qwest.net [97.122.118.250]) by mx.google.com with ESMTPS id t30sm78437210ann.27.2010.07.20.17.44.57 (version=SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 17:44:58 -0700 (PDT) Message-ID: <4C464307.8050407@gmail.com> Date: Tue, 20 Jul 2010 18:44:55 -0600 From: Christoph User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> In-Reply-To: <871vax3fox.fsf@telefonica.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= , Juanma Barranquero , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) On 7/20/2010 5:18 PM, Óscar Fuentes wrote: > rgrep is broken on Windows. rgrep works fine on Windows with the cygwin port of find (see bug #6665). I did however, run into the issue this patch is describing, too using the GnuWin32 port. > Although it is obvious that a general fix > for the shell issue is the most correct resolution for this bug, I > propose to apply the patch below and revert it once cmdproxy.c is > enhanced for dealing with the problem. If nobody else is already working on it, I'd want to give it a try to fix this. Either by enhancing cmdproxy or implementing Eli's batch file solution. Christoph From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 20:50:55 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 00:50:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNWQ-0006tg-W8 for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:50:55 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNWP-0006tb-0O for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:50:53 -0400 Received: from lists.gnu.org ([199.232.76.165]:43668) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObNWo-0004Cx-Ay for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:51:18 -0400 Received: from [140.186.70.92] (port=57022 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObNWm-00013J-Ny for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:51:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObNWj-0000c7-QD for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:51:15 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:61414) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNWj-0000bp-Ld; Tue, 20 Jul 2010 20:51:13 -0400 Received: by bwz9 with SMTP id 9so4111490bwz.0 for ; Tue, 20 Jul 2010 17:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=BLQ8QS1vUutyG13c6QkAIYFBgIshvhoa2LdhTlpH/nU=; b=LP6Tcm3Nyi4b9L/zvgeqCwGkEt0Uuvm8IE9R0aTR8j7132qjts6fqvxiTt/vLwr0TY FqXA30MQogRAzddnBwfb/Gj/UnYU+Ngs7IoURGbZci52vHpKFy4RsSNk2oIyJ3P6tZzh Lsnb+4AyZqMxdzPBvQmWG+QGRtOTiWn4MQIfs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=N42sdc6ESP5dyr+Ib9ug3zO5ipE5jr1oxeNIV5gXQLnrQglnYH/8rNX3KvhXlcdZ6F NEpCjQ2r6D/UwybihBg50Ytgq8wK2p9PVvRD2oiZm3CSTmWXKOXRnTzPEswcYQcsgjJY xCODLBzBXBNEK/zZ0ubU+UyhDdRYaYusEWzDs= Received: by 10.204.178.82 with SMTP id bl18mr5773030bkb.118.1279673472257; Tue, 20 Jul 2010 17:51:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Tue, 20 Jul 2010 17:50:52 -0700 (PDT) In-Reply-To: <4C464307.8050407@gmail.com> References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> From: Juanma Barranquero Date: Wed, 21 Jul 2010 02:50:52 +0200 Message-ID: Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows To: Christoph Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , bug-gnu-emacs@gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) On Wed, Jul 21, 2010 at 02:44, Christoph wrote: > If nobody else is already working on it, I'd want to give it a try to fix > this. Either by enhancing cmdproxy or implementing Eli's batch file > solution. Thanks! =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 20:57:18 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 00:57:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNcb-0006wd-Qh for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:57:18 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNcZ-0006wY-7B for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:57:16 -0400 Received: from lists.gnu.org ([199.232.76.165]:33272) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObNcy-0004Fr-AY for submit@debbugs.gnu.org; Tue, 20 Jul 2010 20:57:40 -0400 Received: from [140.186.70.92] (port=41464 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObNcw-0001ct-TR for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:57:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObNcv-0001Jb-BG for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:57:38 -0400 Received: from impaqm2.telefonica.net ([213.4.138.2]:40868) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObNcv-0001JK-3O for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 20:57:37 -0400 Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm2.telefonica.net with bizsmtp id kQu61e01Q2kvMAa3MQxQTU; Wed, 21 Jul 2010 02:57:24 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost6.adm.correo with BIZ IMP id kQxP1e0033hRxRf1mQxP17; Wed, 21 Jul 2010 02:57:24 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar?= Fuentes To: Christoph Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> Date: Wed, 21 Jul 2010 02:57:22 +0200 In-Reply-To: <4C464307.8050407@gmail.com> (Christoph's message of "Tue, 20 Jul 2010 18:44:55 -0600") Message-ID: <87wrsp1wjx.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: Juanma Barranquero , bug-gnu-emacs@gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) Christoph writes: > rgrep works fine on Windows with the cygwin port of find (see bug > #6665). I guess you are using cygwin's shell as well, aren't you? Or otherwise the command line for cygwin's `find' is shortened enough to not upset cmd.exe I tried MSYS' find (which is a fork of Cygwin) and it had the same issue. [snip] From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 21:21:56 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 01:21:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObO0S-000772-FH for submit@debbugs.gnu.org; Tue, 20 Jul 2010 21:21:56 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObO0Q-00076x-Ci for submit@debbugs.gnu.org; Tue, 20 Jul 2010 21:21:55 -0400 Received: from lists.gnu.org ([199.232.76.165]:60903) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObO0p-0004eN-NG for submit@debbugs.gnu.org; Tue, 20 Jul 2010 21:22:19 -0400 Received: from [140.186.70.92] (port=40451 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObO0o-0003zs-4c for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 21:22:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObO0m-0004Tp-S1 for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 21:22:18 -0400 Received: from lo.gmane.org ([80.91.229.12]:34483) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObO0m-0004Te-Kc for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2010 21:22:16 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ObO0k-0007pm-RP for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 03:22:14 +0200 Received: from 83.42.13.171 ([83.42.13.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Jul 2010 03:22:14 +0200 Received: from ofv by 83.42.13.171 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Jul 2010 03:22:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: =?utf-8?Q?=C3=93scar_Fuentes?= Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS Date: Wed, 21 Jul 2010 03:22:06 +0200 Lines: 19 Message-ID: <87sk3d1vep.fsf@telefonica.net> References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <83tyntde64.fsf@gnu.org> <83sk3ddcfk.fsf@gnu.org> <4C464188.8080901@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 83.42.13.171 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:vtAdtp+1KzEYI/8FhqyVfv6F9Qo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit Cc: Christoph X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Christoph writes: > On 7/20/2010 4:18 PM, Eli Zaretskii wrote: > >> A better (and easier implemented) idea would be to create a temporary >> batch file with the command line and run the batch file with cmd.exe. >> The original command works just fine if invoked from a batch file. > > Out of curiosity, why is a batch file solution better than enhancing > cmdproxy? Because it is 2 orders of magnitude more simple? Enhancing cmdproxy for correctly parsing | (and `&&', if you are on the mood of doing the full job) then creating the pipes, the processes, deal with error conditions and support Win9X is everything but simple. Two or three more additions of this class, and Microsoft will replace cmd.exe with cmdproxy.exe ;-) From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 00:38:20 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 04:38:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObR4V-0008V1-NH for submit@debbugs.gnu.org; Wed, 21 Jul 2010 00:38:20 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObR4T-0008UK-Ka for submit@debbugs.gnu.org; Wed, 21 Jul 2010 00:38:18 -0400 Received: from lists.gnu.org ([199.232.76.165]:53799) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObQYm-0006Zt-4d for submit@debbugs.gnu.org; Wed, 21 Jul 2010 00:05:32 -0400 Received: from [140.186.70.92] (port=34035 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObQYj-000334-Rn for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 00:05:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObQYi-0002JG-Ii for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 00:05:29 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:57613) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObQYf-0002Ii-MC; Wed, 21 Jul 2010 00:05:25 -0400 Received: by gxk4 with SMTP id 4so4279385gxk.0 for ; Tue, 20 Jul 2010 21:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=G1L9o+LiUnDcPC5XOoe9wHLmVFwhD5uDord/UM30Xbo=; b=EbfYysYHfeZlFBmBKp3wkLwUomf9rt47cd3Zz4qSWYM0iVPdvXKnTNA9nME3ERAEI1 NkxJ2h8Bxp/A+qP/utUAXnr8m6ZemQTlYURReUnADLkHz50+keyY3tDlSYwCbZL2jp9E liHnQpHITv1XbrUywkO2oeZY4uYnuI9e1M2xc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=rJn5NVeEwYXNdEpFUxRmCkt6HGsrJGJZrbRyVwAFwo4wXTvo04BOZI+Y85e/sg/KxB dO19lOpAfpBE+O9/uvqvND5i+4OYW/BmxLXzw294qVjt8VLwHzZkiYBvET8q9zEO0Ba0 CboYKlKKNmbCoTgu+9nE3avJt0lD9XU+J7plI= Received: by 10.100.136.3 with SMTP id j3mr7609928and.33.1279685124767; Tue, 20 Jul 2010 21:05:24 -0700 (PDT) Received: from [192.168.1.5] (97-122-118-250.hlrn.qwest.net [97.122.118.250]) by mx.google.com with ESMTPS id i25sm79429477anh.17.2010.07.20.21.05.20 (version=SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 21:05:24 -0700 (PDT) Message-ID: <4C4671FF.7090800@gmail.com> Date: Tue, 20 Jul 2010 22:05:19 -0600 From: Christoph User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> <83pqyhcwit.fsf@gnu.org> In-Reply-To: <83pqyhcwit.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: submit Cc: ofv@wanadoo.es, lekktu@gmail.com, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) On 7/20/2010 10:02 PM, Eli Zaretskii wrote: >> Date: Tue, 20 Jul 2010 18:44:55 -0600 >> From: Christoph >> CC: Eli Zaretskii, Juanma Barranquero, >> Óscar Fuentes >> >> If nobody else is already working on it, I'd want to give it a try to >> fix this. Either by enhancing cmdproxy or implementing Eli's batch file >> solution. > > Thanks. To make my intent clear: I meant to enhance cmdproxy to use a > batch file when invoking the windows shell. You will see that there's > a variable need_shell in cmdproxy's `main' function which gets set to > a non-zero value when cmdproxy decides it needs to pass the command > the the shell instead of invoking it directly. What I suggested is to > modify the code in this case to put the command on a temporary batch > file, then invoke the shell on that batch file rather than on the > command itself. Thanks for the clarification. I will have a look at that. Christoph From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 00:38:22 2010 Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 04:38:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObR4W-0008V3-2m for submit@debbugs.gnu.org; Wed, 21 Jul 2010 00:38:20 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObR4U-0008UK-D3 for submit@debbugs.gnu.org; Wed, 21 Jul 2010 00:38:18 -0400 Received: from lists.gnu.org ([199.232.76.165]:58403) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ObQXG-0006ZA-5P for submit@debbugs.gnu.org; Wed, 21 Jul 2010 00:03:58 -0400 Received: from [140.186.70.92] (port=33862 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObQXB-0002r8-6j for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 00:03:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObQX9-00024h-DT for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 00:03:52 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:43883) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObQX9-00024H-6b for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 00:03:51 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L5W0050037UAO00@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Wed, 21 Jul 2010 07:02:35 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5W00HAF38A4B21@a-mtaout22.012.net.il>; Wed, 21 Jul 2010 07:02:35 +0300 (IDT) Date: Wed, 21 Jul 2010 07:02:34 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows In-reply-to: <4C464307.8050407@gmail.com> To: Christoph Message-id: <83pqyhcwit.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: ofv@wanadoo.es, lekktu@gmail.com, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) > Date: Tue, 20 Jul 2010 18:44:55 -0600 > From: Christoph > CC: Eli Zaretskii , Juanma Barranquero ,=20 > =C3=93scar Fuentes >=20 > If nobody else is already working on it, I'd want to give it a try = to=20 > fix this. Either by enhancing cmdproxy or implementing Eli's batch = file=20 > solution. Thanks. To make my intent clear: I meant to enhance cmdproxy to use = a batch file when invoking the windows shell. You will see that there'= s a variable need_shell in cmdproxy's `main' function which gets set to a non-zero value when cmdproxy decides it needs to pass the command the the shell instead of invoking it directly. What I suggested is t= o modify the code in this case to put the command on a temporary batch file, then invoke the shell on that batch file rather than on the command itself. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 01 22:21:34 2010 Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 02:21:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofkek-0007zs-3F for submit@debbugs.gnu.org; Sun, 01 Aug 2010 22:21:34 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofkei-0007zk-CH for submit@debbugs.gnu.org; Sun, 01 Aug 2010 22:21:33 -0400 Received: from lists.gnu.org ([199.232.76.165]:52517) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ofkf4-0007Fv-Hf for submit@debbugs.gnu.org; Sun, 01 Aug 2010 22:21:54 -0400 Received: from [140.186.70.92] (port=58940 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofkf2-0003rx-Ud for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2010 22:21:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ofkf2-0003U5-2R for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2010 22:21:52 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:57292) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofkf0-0003To-0r; Sun, 01 Aug 2010 22:21:50 -0400 Received: by gwj16 with SMTP id 16so1539488gwj.0 for ; Sun, 01 Aug 2010 19:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=eze0UrPtB3oCxH8QqFRucijtRd2+suRWenz56awPJG0=; b=cjKXvgsAC67JUJ6FkMnjUhiuRXyjWFZa6RAGbkubaoOLrji8I+CAIWGkjRiY9UaBJF NR0S2BaHhXaoPNbynTy8VUy8EI1EvVEkvCpqzOQPUE5KtJ2mK1g4P1XkWly3ErwZ/ALZ sVg3FItqWPBRR43aWE+8ce8HbsceTOt87tmJ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=sqXB6rf34TW6pIQucjV8C029+jnX7LWWPp7XkwmzCQAengLXA6wnvepUCZ81wgR5kn aUtoSWzddoAcz1fzeryVsqBYPNqBLaCXLNjIWD6fengliQkiCXomqRKEWPrDhfoTE2lI 80wRSg1L1lkC+lOwF+txKOBT+zYGCNJJ3tzyM= Received: by 10.100.35.18 with SMTP id i18mr5465211ani.139.1280715709141; Sun, 01 Aug 2010 19:21:49 -0700 (PDT) Received: from [192.168.1.4] (184-96-103-154.hlrn.qwest.net [184.96.103.154]) by mx.google.com with ESMTPS id c19sm8782868ana.2.2010.08.01.19.21.47 (version=SSLv3 cipher=RC4-MD5); Sun, 01 Aug 2010 19:21:48 -0700 (PDT) Message-ID: <4C562BB7.6000702@gmail.com> Date: Sun, 01 Aug 2010 20:21:43 -0600 From: Christoph User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> <83pqyhcwit.fsf@gnu.org> In-Reply-To: <83pqyhcwit.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit Cc: ofv@wanadoo.es, lekktu@gmail.com, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On 7/20/2010 10:02 PM, Eli Zaretskii wrote: > Thanks. To make my intent clear: I meant to enhance cmdproxy to use a > batch file when invoking the windows shell. You will see that there's > a variable need_shell in cmdproxy's `main' function which gets set to > a non-zero value when cmdproxy decides it needs to pass the command > the the shell instead of invoking it directly. What I suggested is to > modify the code in this case to put the command on a temporary batch > file, then invoke the shell on that batch file rather than on the > command itself. Eli, I remember a comment of yours earlier in the thread that DOS does not have the problem. I assume that this is due to a difference in command.com vs cmd.exe? Do we want to execute the batch file only in case of cmd.exe or for both command.com and cmd.exe? Christoph From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 01 23:09:53 2010 Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 03:09:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OflPV-0008J1-39 for submit@debbugs.gnu.org; Sun, 01 Aug 2010 23:09:53 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OflPT-0008Iw-Ds for submit@debbugs.gnu.org; Sun, 01 Aug 2010 23:09:52 -0400 Received: from lists.gnu.org ([199.232.76.165]:42016) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OflPp-0007lI-Qf for submit@debbugs.gnu.org; Sun, 01 Aug 2010 23:10:13 -0400 Received: from [140.186.70.92] (port=54580 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OflPo-0005wf-CS for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2010 23:10:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OflPn-0001AY-20 for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2010 23:10:12 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:45490) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OflPm-0001AJ-Nr for bug-gnu-emacs@gnu.org; Sun, 01 Aug 2010 23:10:11 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L6I00L008NXE700@a-mtaout23.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 06:10:08 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6I00IFM8SVMMK0@a-mtaout23.012.net.il>; Mon, 02 Aug 2010 06:10:08 +0300 (IDT) Date: Mon, 02 Aug 2010 06:10:10 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows In-reply-to: <4C562BB7.6000702@gmail.com> X-012-Sender: halo1@inter.net.il To: Christoph Message-id: <83aap5zp4d.fsf@gnu.org> References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> <83pqyhcwit.fsf@gnu.org> <4C562BB7.6000702@gmail.com> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit Cc: ofv@wanadoo.es, lekktu@gmail.com, bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) > Date: Sun, 01 Aug 2010 20:21:43 -0600 > From: Christoph > CC: bug-gnu-emacs@gnu.org, lekktu@gmail.com, ofv@wanadoo.es > > On 7/20/2010 10:02 PM, Eli Zaretskii wrote: > > > Thanks. To make my intent clear: I meant to enhance cmdproxy to use a > > batch file when invoking the windows shell. You will see that there's > > a variable need_shell in cmdproxy's `main' function which gets set to > > a non-zero value when cmdproxy decides it needs to pass the command > > the the shell instead of invoking it directly. What I suggested is to > > modify the code in this case to put the command on a temporary batch > > file, then invoke the shell on that batch file rather than on the > > command itself. > > Eli, > I remember a comment of yours earlier in the thread that DOS does not > have the problem. That's right. > I assume that this is due to a difference in command.com vs cmd.exe? No. That's because the DOS port doesn't call command.com at all. It has its own implementation of a shell as part of the `system' function in the standard library it links against. That implementation supports pipes, redirection, quoting, long (up to 16KB) command lines, and a few other minor Posix features, like /dev/null. > Do we want to execute the batch file only in case of cmd.exe or for both > command.com and cmd.exe? Yes, for the benefit of Windows 9X. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 00:03:24 2010 Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 04:03:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfmFH-0000D1-Pn for submit@debbugs.gnu.org; Mon, 02 Aug 2010 00:03:24 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfmFF-0000Cv-4K for submit@debbugs.gnu.org; Mon, 02 Aug 2010 00:03:21 -0400 Received: from lists.gnu.org ([199.232.76.165]:40782) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OfmFa-0008GG-Rz for submit@debbugs.gnu.org; Mon, 02 Aug 2010 00:03:42 -0400 Received: from [140.186.70.92] (port=40900 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfmFZ-00011m-2C for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 00:03:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfmFX-0007Mw-Dd for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 00:03:40 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:41303) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfmFT-0007MB-AE; Mon, 02 Aug 2010 00:03:35 -0400 Received: by gxk4 with SMTP id 4so1554991gxk.0 for ; Sun, 01 Aug 2010 21:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=qdr7dNOi7MfDSxlpXLFNf5v/lhmYH+twRMKzP9pohis=; b=i3vohORpo4CH+KBhJrVCv4EJQhmaKYuN09lptRwxklBS/Ur3aqDCOX0zdbR1L+Nn6d LltHcJ3FJBB1TS3PmvXCgOJ3j6QSi8e1rhY9aLo7KqODu2+UAPlyOxa6xN0Z6pLbBcqm pBfe1tzYdPWLUM8Ey+3N275QU+ZH/+0EH1/vQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=E+8AijOxcNxF7ha8Ldu+w8YuoNuA7Z6NPMfDDqETdWZV8It84tgh+Vo/OrsG+eJqlm 9a8K2muT5fnc1folXoWnzx36DBuyyT3WzuO1BwKnzWZEXOoQtXxo0XH/LiqceaHIAs0v F0woVaytail9YEbA1tqwPHls5O77K/wIeR+og= Received: by 10.101.185.6 with SMTP id m6mr5677713anp.22.1280721814836; Sun, 01 Aug 2010 21:03:34 -0700 (PDT) Received: from [192.168.1.4] (184-96-103-154.hlrn.qwest.net [184.96.103.154]) by mx.google.com with ESMTPS id p12sm8943357ane.14.2010.08.01.21.03.33 (version=SSLv3 cipher=RC4-MD5); Sun, 01 Aug 2010 21:03:34 -0700 (PDT) Message-ID: <4C564391.8000904@gmail.com> Date: Sun, 01 Aug 2010 22:03:29 -0600 From: Christoph User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> <83pqyhcwit.fsf@gnu.org> <4C562BB7.6000702@gmail.com> <83aap5zp4d.fsf@gnu.org> In-Reply-To: <83aap5zp4d.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) On 8/1/2010 9:10 PM, Eli Zaretskii wrote: > No. That's because the DOS port doesn't call command.com at all. It > has its own implementation of a shell as part of the `system' function > in the standard library it links against. That implementation > supports pipes, redirection, quoting, long (up to 16KB) command lines, > and a few other minor Posix features, like /dev/null. I see. Just out of curiosity, why can't this shell implementation be used for Windows? >> Do we want to execute the batch file only in case of cmd.exe or for both >> command.com and cmd.exe? > > Yes, for the benefit of Windows 9X. Sounds good. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 06:26:30 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 10:26:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfsE1-0003CT-Kf for submit@debbugs.gnu.org; Mon, 02 Aug 2010 06:26:29 -0400 Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfsDz-0003CL-4j for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 06:26:27 -0400 Received: by eyb7 with SMTP id 7so1167082eyb.3 for <6674@debbugs.gnu.org>; Mon, 02 Aug 2010 03:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=cJJ97YHABRdK9rZd+yq+TzNcQue/izaDe+NpgWjfsfQ=; b=cO5aWpSsmFUzvaBsvm2+tCHIZ5wcEjaOxPpoVBPUML5jSj58fKET7XFVaCxsTAmnqs T58DpTduNqyFke+NMDJZbhRCgX6RkjxrsFIwgMs2IEH+xQhquTeFsJrvQvF2rsgOAi1O 6VGwLKrmdxEmSXvRzG06K8kGWvCqMhpb2J2OI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=m/kxiX8mLEIog7IVZntekzHrxK7QW/gl5yyL+Qfd7mpHxEOPn9kaaUaMlKzY/9jNWc bRHxge6LeOpz0nu2zKm28BqXLbtJCjRCQScmdxb5EQahVozIf/UGf9R85CeC4ZT0vbvA 08Ff4i6sn4O11LGkxBr1cfprdMphiKZ9f1+iM= Received: by 10.213.44.83 with SMTP id z19mr3556205ebe.93.1280744804284; Mon, 02 Aug 2010 03:26:44 -0700 (PDT) Received: from [192.168.1.72] (78-58-76-89.static.zebra.lt [78.58.76.89]) by mx.google.com with ESMTPS id v8sm8585589eeh.2.2010.08.02.03.26.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Aug 2010 03:26:43 -0700 (PDT) Message-ID: <4C569D60.5040804@gmail.com> Date: Mon, 02 Aug 2010 13:26:40 +0300 From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 MIME-Version: 1.0 To: =?UTF-8?B?w5NzY2FyIEZ1ZW50ZXM=?= Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> In-Reply-To: <87eiey2apg.fsf@telefonica.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) Óscar Fuentes wrote: > The issue is that "cmd.exe -c" seems to have a 1024 char limit when the > command contains a pipe (my guess is that the limit applies separatelly > to every command on the pipe chain) and cmdproxy.c prepends "cmd.exe -c" > to the command when it has a pipe, redirection, etc. Isn't it wsprintf (used in cmdproxy.c to quote args and for other purposes): http://msdn.microsoft.com/en-us/library/ms647550(VS.85).aspx that imposes 1024 buffer/string length limit...? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 11:23:03 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 15:23:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofwr1-0005y8-AJ for submit@debbugs.gnu.org; Mon, 02 Aug 2010 11:23:03 -0400 Received: from impaqm1.telefonica.net ([213.4.138.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofwqz-0005xm-Pm for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 11:23:02 -0400 Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm1.telefonica.net with bizsmtp id pSUx1e04f2jdgqJ01TPQFf; Mon, 02 Aug 2010 17:23:24 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost5.adm.correo with BIZ IMP id pTPP1e0043hRxRf1lTPPVK; Mon, 02 Aug 2010 17:23:24 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: Laimonas =?utf-8?Q?V=C4=97bra?= Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> Date: Mon, 02 Aug 2010 17:23:22 +0200 In-Reply-To: <4C569D60.5040804@gmail.com> ("Laimonas =?utf-8?Q?V=C4=97bra?= =?utf-8?Q?=22's?= message of "Mon, 02 Aug 2010 13:26:40 +0300") Message-ID: <877hk9donp.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 Cc: =?utf-8?Q?=C3=93scar?= Fuentes , 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Laimonas V=C4=97bra writes: > =C3=93scar Fuentes wrote: > >> The issue is that "cmd.exe -c" seems to have a 1024 char limit when the >> command contains a pipe (my guess is that the limit applies separatelly >> to every command on the pipe chain) and cmdproxy.c prepends "cmd.exe -c" >> to the command when it has a pipe, redirection, etc. > > Isn't it wsprintf (used in cmdproxy.c to quote args and for other purpose= s): > http://msdn.microsoft.com/en-us/library/ms647550(VS.85).aspx > > that imposes 1024 buffer/string length limit...? Yes! Patch in progress... From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 11:47:55 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 15:47:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfxF4-00067n-TK for submit@debbugs.gnu.org; Mon, 02 Aug 2010 11:47:55 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfxF2-00067i-0h for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 11:47:53 -0400 Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm4.telefonica.net with bizsmtp id pT0M1e00H0r0BT63QToE6q; Mon, 02 Aug 2010 17:48:14 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost2.adm.correo with BIZ IMP id pToC1e00W3hRxRf1iToDup; Mon, 02 Aug 2010 17:48:14 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: 6674@debbugs.gnu.org Subject: [PATCH] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> Date: Mon, 02 Aug 2010 17:48:12 +0200 In-Reply-To: <4C569D60.5040804@gmail.com> ("Laimonas =?utf-8?Q?V=C4=97bra?= =?utf-8?Q?=22's?= message of "Mon, 02 Aug 2010 13:26:40 +0300") Message-ID: <8739uxdnib.fsf_-_@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 Cc: Christoph , Laimonas =?utf-8?Q?V=C4=97bra?= , Eli Zaretskii , Juanma, Barranquero X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Laimonas V=C4=97bra writes: > Isn't it wsprintf (used in cmdproxy.c to quote args and for other purpose= s): > http://msdn.microsoft.com/en-us/library/ms647550(VS.85).aspx > > that imposes 1024 buffer/string length limit...? 2010-08-02 =C3=93scar Fuentes * cmdproxy.c (main): use _snprintf instead of wsprintf. Fixes bug#6647. wsprintf has a 1024 char limit on Windows. --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c @@ -35,6 +35,9 @@ along with GNU Emacs. If not, see . */ #include /* getenv */ #include /* strlen */ =20 +/* We don't want to include stdio.h because we are alreayd duplicating + lots of it here */ +int _snprintf(char *buffer, size_t count, const char *format, ...); =20 /******* Mock C library routines *********************************/ =20 @@ -604,6 +607,7 @@ main (int argc, char ** argv) { char * p; int extra_arg_space =3D 0; + int maxlen, remlen; int run_command_dot_com; =20 progname =3D getenv ("COMSPEC"); @@ -635,21 +639,32 @@ main (int argc, char ** argv) case path contains spaces (fortunately it can't contain quotes, since they are illegal in path names). */ =20 - buf =3D p =3D alloca (strlen (progname) + extra_arg_space + - strlen (cmdline) + 16); + remlen =3D maxlen =3D + strlen (progname) + extra_arg_space + strlen (cmdline) + 16; + buf =3D p =3D alloca (maxlen + 1); =20 /* Quote progname in case it contains spaces. */ - p +=3D wsprintf (p, "\"%s\"", progname); + p +=3D _snprintf (p, remlen, "\"%s\"", progname); + remlen =3D maxlen - (p - buf); =20 /* Include pass_through_args verbatim; these are just switches so should not need quoting. */ for (argv =3D pass_through_args; *argv !=3D NULL; ++argv) - p +=3D wsprintf (p, " %s", *argv); + { + p +=3D _snprintf (p, remlen, " %s", *argv); + remlen =3D maxlen - (p - buf); + } =20 if (run_command_dot_com) - wsprintf(p, " /e:%d /c %s", envsize, cmdline); + { + _snprintf(p, remlen, " /e:%d /c %s", envsize, cmdline); + remlen =3D maxlen - (p - buf); + } else - wsprintf(p, " /c %s", cmdline); + { + _snprintf(p, remlen, " /c %s", cmdline); + remlen =3D maxlen - (p - buf); + } cmdline =3D buf; } else @@ -669,19 +684,27 @@ main (int argc, char ** argv) else path[0] =3D '\0'; =20 - cmdline =3D p =3D alloca (strlen (progname) + extra_arg_space + - strlen (path) + 13); + remlen =3D maxlen =3D + strlen (progname) + extra_arg_space + strlen (path) + 13; + cmdline =3D p =3D alloca (maxlen + 1); =20 /* Quote progname in case it contains spaces. */ - p +=3D wsprintf (p, "\"%s\" %s", progname, path); + p +=3D _snprintf (p, remlen, "\"%s\" %s", progname, path); + remlen =3D maxlen - (p - cmdline); =20 /* Include pass_through_args verbatim; these are just switches so should not need quoting. */ for (argv =3D pass_through_args; *argv !=3D NULL; ++argv) - p +=3D wsprintf (p, " %s", *argv); + { + p +=3D _snprintf (p, remlen, " %s", *argv); + remlen =3D maxlen - (p - cmdline); + } =20 if (run_command_dot_com) - wsprintf (p, " /e:%d", envsize); + { + _snprintf (p, remlen, " /e:%d", envsize); + remlen =3D maxlen - (p - cmdline); + } } } =20 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 13:10:46 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 17:10:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfyXG-0007lB-1p for submit@debbugs.gnu.org; Mon, 02 Aug 2010 13:10:46 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfyXD-0007ks-LW for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 13:10:44 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id B846A1C0024B; Mon, 2 Aug 2010 19:11:06 +0200 (CEST) Received: from igel.home (ppp-88-217-106-57.dynamic.mnet-online.de [88.217.106.57]) by mail.mnet-online.de (Postfix) with ESMTP id 73FDE1C0016F; Mon, 2 Aug 2010 19:11:06 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id AB06ACA297; Mon, 2 Aug 2010 19:11:05 +0200 (CEST) From: Andreas Schwab To: =?utf-8?Q?=C3=93scar?= Fuentes Subject: Re: bug#6674: [PATCH] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> X-Yow: Why am I in this ROOM in DOWNTOWN PHILADELPHIA? Date: Mon, 02 Aug 2010 19:11:04 +0200 In-Reply-To: <8739uxdnib.fsf_-_@telefonica.net> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Mon, 02 Aug 2010 17:48:12 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6674 Cc: Christoph , Juanma@debbugs.gnu.org, 6674@debbugs.gnu.org, Barranquero X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) =C3=93scar Fuentes writes: > +/* We don't want to include stdio.h because we are alreayd duplicating s/yd/dy/ Andreas. --=20 Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 13:48:14 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 17:48:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofz7W-0008GP-Dl for submit@debbugs.gnu.org; Mon, 02 Aug 2010 13:48:14 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofz7T-0008GK-3S for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 13:48:12 -0400 Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm4.telefonica.net with bizsmtp id pUvZ1e00P2kvMAa3QVoYgd; Mon, 02 Aug 2010 19:48:32 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost6.adm.correo with BIZ IMP id pVoV1e00Q3hRxRf1mVoWka; Mon, 02 Aug 2010 19:48:32 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: 6674@debbugs.gnu.org Subject: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> Date: Mon, 02 Aug 2010 19:48:29 +0200 In-Reply-To: <8739uxdnib.fsf_-_@telefonica.net> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Mon, 02 Aug 2010 17:48:12 +0200") Message-ID: <87vd7sdhxu.fsf_-_@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Fixed the typo pointed out by Andreas. 2010-08-02 =C3=93scar Fuentes * cmdproxy.c (main): use _snprintf instead of wsprintf. Fixes bug#6647. wsprintf has a 1024 char limit on Windows. --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c @@ -35,6 +35,9 @@ along with GNU Emacs. If not, see . */ #include /* getenv */ #include /* strlen */ =20 +/* We don't want to include stdio.h because we are already duplicating + lots of it here */ +int _snprintf(char *buffer, size_t count, const char *format, ...); =20 /******* Mock C library routines *********************************/ =20 @@ -604,6 +607,7 @@ main (int argc, char ** argv) { char * p; int extra_arg_space =3D 0; + int maxlen, remlen; int run_command_dot_com; =20 progname =3D getenv ("COMSPEC"); @@ -635,21 +639,32 @@ main (int argc, char ** argv) case path contains spaces (fortunately it can't contain quotes, since they are illegal in path names). */ =20 - buf =3D p =3D alloca (strlen (progname) + extra_arg_space + - strlen (cmdline) + 16); + remlen =3D maxlen =3D + strlen (progname) + extra_arg_space + strlen (cmdline) + 16; + buf =3D p =3D alloca (maxlen + 1); =20 /* Quote progname in case it contains spaces. */ - p +=3D wsprintf (p, "\"%s\"", progname); + p +=3D _snprintf (p, remlen, "\"%s\"", progname); + remlen =3D maxlen - (p - buf); =20 /* Include pass_through_args verbatim; these are just switches so should not need quoting. */ for (argv =3D pass_through_args; *argv !=3D NULL; ++argv) - p +=3D wsprintf (p, " %s", *argv); + { + p +=3D _snprintf (p, remlen, " %s", *argv); + remlen =3D maxlen - (p - buf); + } =20 if (run_command_dot_com) - wsprintf(p, " /e:%d /c %s", envsize, cmdline); + { + _snprintf(p, remlen, " /e:%d /c %s", envsize, cmdline); + remlen =3D maxlen - (p - buf); + } else - wsprintf(p, " /c %s", cmdline); + { + _snprintf(p, remlen, " /c %s", cmdline); + remlen =3D maxlen - (p - buf); + } cmdline =3D buf; } else @@ -669,19 +684,27 @@ main (int argc, char ** argv) else path[0] =3D '\0'; =20 - cmdline =3D p =3D alloca (strlen (progname) + extra_arg_space + - strlen (path) + 13); + remlen =3D maxlen =3D + strlen (progname) + extra_arg_space + strlen (path) + 13; + cmdline =3D p =3D alloca (maxlen + 1); =20 /* Quote progname in case it contains spaces. */ - p +=3D wsprintf (p, "\"%s\" %s", progname, path); + p +=3D _snprintf (p, remlen, "\"%s\" %s", progname, path); + remlen =3D maxlen - (p - cmdline); =20 /* Include pass_through_args verbatim; these are just switches so should not need quoting. */ for (argv =3D pass_through_args; *argv !=3D NULL; ++argv) - p +=3D wsprintf (p, " %s", *argv); + { + p +=3D _snprintf (p, remlen, " %s", *argv); + remlen =3D maxlen - (p - cmdline); + } =20 if (run_command_dot_com) - wsprintf (p, " /e:%d", envsize); + { + _snprintf (p, remlen, " /e:%d", envsize); + remlen =3D maxlen - (p - cmdline); + } } } =20 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 14:47:45 2010 Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 18:47:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og036-0000E8-Ms for submit@debbugs.gnu.org; Mon, 02 Aug 2010 14:47:45 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og035-0000E2-Up for submit@debbugs.gnu.org; Mon, 02 Aug 2010 14:47:44 -0400 Received: from lists.gnu.org ([199.232.76.165]:41183) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OfzLE-0005p3-Py for submit@debbugs.gnu.org; Mon, 02 Aug 2010 14:02:24 -0400 Received: from [140.186.70.92] (port=43322 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfzL6-0004rk-FO for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 14:02:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfzL0-0007yI-0K for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 14:02:11 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:51535) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfzKz-0007xy-NW for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 14:02:09 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L6J00H00DZIIJ00@a-mtaout20.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 21:02:04 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6J00ADOE3F3IK0@a-mtaout20.012.net.il>; Mon, 02 Aug 2010 21:02:04 +0300 (IDT) Date: Mon, 02 Aug 2010 21:02:06 +0300 From: Eli Zaretskii Subject: Re: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows In-reply-to: <4C564391.8000904@gmail.com> X-012-Sender: halo1@inter.net.il To: Christoph Message-id: <837hk8zye9.fsf@gnu.org> References: <878w564xtc.fsf@telefonica.net> <871vax3fox.fsf@telefonica.net> <4C464307.8050407@gmail.com> <83pqyhcwit.fsf@gnu.org> <4C562BB7.6000702@gmail.com> <83aap5zp4d.fsf@gnu.org> <4C564391.8000904@gmail.com> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > Date: Sun, 01 Aug 2010 22:03:29 -0600 > From: Christoph > CC: bug-gnu-emacs@gnu.org > > On 8/1/2010 9:10 PM, Eli Zaretskii wrote: > > > No. That's because the DOS port doesn't call command.com at all. It > > has its own implementation of a shell as part of the `system' function > > in the standard library it links against. That implementation > > supports pipes, redirection, quoting, long (up to 16KB) command lines, > > and a few other minor Posix features, like /dev/null. > > I see. Just out of curiosity, why can't this shell implementation be > used for Windows? (Looks like the original bug is fixed already, but I will answer this anyway, for the record.) Yes, we could do that. The source of the DJGPP implementation used by the DOS port is Free Software. However, this is a non-trivial job, because porting that code to Windows will need some reimplementation. E.g., pipes are implemented with temporary files and commands are run sequentially, one by one (this is DOS, right?), but on Windows we have real pipes and we should run both sides of the pipe concurrently. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 15:07:31 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 19:07:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og0MF-0000OC-8P for submit@debbugs.gnu.org; Mon, 02 Aug 2010 15:07:31 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og0MC-0000O3-RX for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 15:07:30 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L6J00G00GVP2B00@a-mtaout22.012.net.il> for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 22:07:52 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6J00DOVH4ZPC90@a-mtaout22.012.net.il>; Mon, 02 Aug 2010 22:07:48 +0300 (IDT) Date: Mon, 02 Aug 2010 22:07:50 +0300 From: Eli Zaretskii Subject: Re: bug#6674: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <87vd7sdhxu.fsf_-_@telefonica.net> To: =?UTF-8?Q?=C3=93scar?= Fuentes Message-id: <831vagzvcp.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> <87vd7sdhxu.fsf_-_@telefonica.net> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: =C3=93scar Fuentes > Date: Mon, 02 Aug 2010 19:48:29 +0200 > Cc:=20 >=20 > Fixed the typo pointed out by Andreas. >=20 > 2010-08-02 =C3=93scar Fuentes >=20 > =09* cmdproxy.c (main): use _snprintf instead of wsprintf. Fixes > =09bug#6647. wsprintf has a 1024 char limit on Windows. Thanks. wsprintf supports wide character (UTF-16) strings, whereas _snprintf does not. At the very least, please leave a comment there about that= . Better yet, why not use memcpy etc. instead of _snprintf; you don't really need any formatting features anyway. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 15:47:32 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 19:47:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og0yy-0000ea-59 for submit@debbugs.gnu.org; Mon, 02 Aug 2010 15:47:32 -0400 Received: from mail-yx0-f172.google.com ([209.85.213.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og0yw-0000eT-PN for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 15:47:31 -0400 Received: by yxj4 with SMTP id 4so1414933yxj.3 for <6674@debbugs.gnu.org>; Mon, 02 Aug 2010 12:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Kfam/Tl2vcV15uhIKhZZn4cNzcWwdH9+3HMq/SqBGpI=; b=PJPMsVOZzCrG/4cYfyCnZOlRQXqlwnEvKuDJNB/MNy68jkDXgSk9XMlc0E4DT4jNt5 2E1zwkbgpqdMnnyLCaU4mfmNuaXd9vUnPheOpeDX8xa0pSBBtqOjhMeJLR/GXGkSD5bv bnhoGKK1GrssZyeqODzjkuk8DS0NbrxbBh1ZA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=CL/D5LyExyh2h5ZUuD9YvaTiC+8ozv34Y3nhhw37Clq+YTds1i/94cv4o36SsXiCfg bqXzjWMOtlpKwBTAWcfoB/k89EoABXDhw5NG2sQUmVOw53+/PnvhYylhaxn6ycC51pgG hliEz2o0T7M+rkH0O/T5fPru8P+a0TBAMa0xE= Received: by 10.150.145.7 with SMTP id s7mr1583375ybd.31.1280778474388; Mon, 02 Aug 2010 12:47:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.162.4 with HTTP; Mon, 2 Aug 2010 12:47:33 -0700 (PDT) In-Reply-To: <831vagzvcp.fsf@gnu.org> References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> <87vd7sdhxu.fsf_-_@telefonica.net> <831vagzvcp.fsf@gnu.org> From: Juanma Barranquero Date: Mon, 2 Aug 2010 21:47:33 +0200 Message-ID: Subject: Re: bug#6674: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6674 Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On Mon, Aug 2, 2010 at 21:07, Eli Zaretskii wrote: > wsprintf supports wide character (UTF-16) strings, whereas _snprintf > does not. =C2=A0At the very least, please leave a comment there about tha= t. > Better yet, why not use memcpy etc. instead of _snprintf; you don't > really need any formatting features anyway. I've already committed the change on emacs-23, because it fixes the original report. I'll install any followup patch =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 15:57:12 2010 Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 19:57:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og18K-0000iq-Bj for submit@debbugs.gnu.org; Mon, 02 Aug 2010 15:57:12 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og18I-0000ik-2Z for submit@debbugs.gnu.org; Mon, 02 Aug 2010 15:57:10 -0400 Received: from lists.gnu.org ([199.232.76.165]:42298) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Og18g-0008LH-Bb for submit@debbugs.gnu.org; Mon, 02 Aug 2010 15:57:34 -0400 Received: from [140.186.70.92] (port=36527 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og18d-0004lO-Nc for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 15:57:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Og18b-00047q-46 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 15:57:31 -0400 Received: from lo.gmane.org ([80.91.229.12]:47278) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og18a-00047a-Ur for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 15:57:29 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Og18X-000560-J0 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 21:57:25 +0200 Received: from 83.42.13.171 ([83.42.13.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Aug 2010 21:57:25 +0200 Received: from ofv by 83.42.13.171 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Aug 2010 21:57:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: =?utf-8?Q?=C3=93scar_Fuentes?= Subject: Re: bug#6674: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS Date: Mon, 02 Aug 2010 21:57:16 +0200 Lines: 32 Message-ID: <8739uwdbz7.fsf@telefonica.net> References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> <87vd7sdhxu.fsf_-_@telefonica.net> <831vagzvcp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 83.42.13.171 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:oULlFgFEbrZSI67Vlph/cBivmBM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) Eli Zaretskii writes: >> Fixed the typo pointed out by Andreas. >> >> 2010-08-02 Óscar Fuentes >> >> * cmdproxy.c (main): use _snprintf instead of wsprintf. Fixes >> bug#6647. wsprintf has a 1024 char limit on Windows. > > Thanks. > > wsprintf supports wide character (UTF-16) strings, whereas _snprintf > does not. wsprintf supports UTF-16 iff the application is compiled with Unicode support on. cmdproxy uses char, not wchar_t, so if the build switches on Unicode the compilation will fail. > At the very least, please leave a comment there about that. It should be obvious from the type used (char) > Better yet, why not use memcpy etc. instead of _snprintf; you don't > really need any formatting features anyway. It uses "\"%s\"" " %s" " /e:%d /c %s" and more. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 16:11:51 2010 Received: (at 6674) by debbugs.gnu.org; 2 Aug 2010 20:11:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1MU-0000pF-U3 for submit@debbugs.gnu.org; Mon, 02 Aug 2010 16:11:51 -0400 Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1MS-0000p9-CI for 6674@debbugs.gnu.org; Mon, 02 Aug 2010 16:11:48 -0400 Received: by iwn3 with SMTP id 3so294211iwn.3 for <6674@debbugs.gnu.org>; Mon, 02 Aug 2010 13:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=a8hK0XjTrSCnG8nwK/0VoTsVmH9ZZoUSNKgPg8d6ilo=; b=j6FXWNyWlLl7VFbCjFi0tmhK6e5ohbY6XDHZdff40D7u9Zs0CYLjtaK41uhof5ny77 qW3IVKgVhmbWAup+mU/3oYynLiwR0tLgslADCxt7kQUZnOg4DyV1jzlxpLPYEggTsCQ8 91nqiAdXbxdbeaKGMIutsg1+xIy4fi5SydHiE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=oHoKctIgamFkfZcTAwXAGYeDrlVss3eLoRwNeBNh9PN9Be4s42b+r8UGkT5Ugd7IM9 cu5uN7awupcoq1/RL8lVUCBxz78CGdHW0XYs0TGf/glmewX+agxd99CAFjYd6DLOfVTV 0HJSh5lqP5YXntFsYRx/mIRKF3w+46MqGsmQc= Received: by 10.231.169.10 with SMTP id w10mr7467928iby.106.1280779932236; Mon, 02 Aug 2010 13:12:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.162.4 with HTTP; Mon, 2 Aug 2010 13:11:51 -0700 (PDT) In-Reply-To: <8739uwdbz7.fsf@telefonica.net> References: <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> <87vd7sdhxu.fsf_-_@telefonica.net> <831vagzvcp.fsf@gnu.org> <878w564xtc.fsf@telefonica.net> <8739uwdbz7.fsf@telefonica.net> From: Juanma Barranquero Date: Mon, 2 Aug 2010 22:11:51 +0200 Message-ID: Subject: Re: bug#6674: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS To: =?UTF-8?Q?=C3=93scar_Fuentes?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6674 Cc: 6674@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) 2010/8/2 =C3=93scar Fuentes : > wsprintf supports UTF-16 iff the application is compiled with Unicode > support on. cmdproxy uses char, not wchar_t, so if the build switches on > Unicode the compilation will fail. If there's nothing more to do, please close bug#6674. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 16:14:55 2010 Received: (at submit) by debbugs.gnu.org; 2 Aug 2010 20:14:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1PT-0000qY-67 for submit@debbugs.gnu.org; Mon, 02 Aug 2010 16:14:55 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1PQ-0000qS-Uf for submit@debbugs.gnu.org; Mon, 02 Aug 2010 16:14:53 -0400 Received: from lists.gnu.org ([199.232.76.165]:55986) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Og1Pp-0000DB-1z for submit@debbugs.gnu.org; Mon, 02 Aug 2010 16:15:17 -0400 Received: from [140.186.70.92] (port=49607 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og1Pn-0004sm-9z for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 16:15:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Og1Pm-0006xt-FY for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 16:15:15 -0400 Received: from lo.gmane.org ([80.91.229.12]:36756) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1Pm-0006xK-8z for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 16:15:14 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Og1Pj-00064U-Gt for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 22:15:11 +0200 Received: from 83.42.13.171 ([83.42.13.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Aug 2010 22:15:11 +0200 Received: from ofv by 83.42.13.171 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Aug 2010 22:15:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: =?utf-8?Q?=C3=93scar_Fuentes?= Subject: Re: bug#6674: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS Date: Mon, 02 Aug 2010 22:15:02 +0200 Lines: 25 Message-ID: <87pqy0bwl5.fsf@telefonica.net> References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> <87vd7sdhxu.fsf_-_@telefonica.net> <831vagzvcp.fsf@gnu.org> <8739uwdbz7.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 83.42.13.171 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:R0S4DnXX1H9X5mNG2Zx/1MJJZZw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Óscar Fuentes writes: >>> * cmdproxy.c (main): use _snprintf instead of wsprintf. Fixes >>> bug#6647. wsprintf has a 1024 char limit on Windows. >> >> Thanks. >> >> wsprintf supports wide character (UTF-16) strings, whereas _snprintf >> does not. > > wsprintf supports UTF-16 iff the application is compiled with Unicode > support on. cmdproxy uses char, not wchar_t, so if the build switches on > Unicode the compilation will fail. This is poorly explained. To begin, cmdproxy, as it was before the patch, does not support UTF-16. For fixing that, you need to start by implementing int wmain(int argc, wchar_t *argv[]) and revise all string handling from there. The workload the patch adds for migrating cmdproxy to UTF-16 would consist on s/_snprintf/_snwprintf. Not doing that would cause compilation errors. [snip] From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 16:17:24 2010 Received: (at 6674-done) by debbugs.gnu.org; 2 Aug 2010 20:17:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1Rr-0000sL-MA for submit@debbugs.gnu.org; Mon, 02 Aug 2010 16:17:23 -0400 Received: from impaqm4.telefonica.net ([213.4.138.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og1Ro-0000sD-Ox for 6674-done@debbugs.gnu.org; Mon, 02 Aug 2010 16:17:21 -0400 Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm4.telefonica.net with bizsmtp id pXJy1e00f2kvMAa3QYHYPk; Mon, 02 Aug 2010 22:17:32 +0200 Received: from qcore ([83.42.13.171]) by IMPmailhost6.adm.correo with BIZ IMP id pYHX1e0063hRxRf1mYHYqW; Mon, 02 Aug 2010 22:17:32 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: =?utf-8?Q?=C3=93scar_Fuentes?= To: 6674-done@debbugs.gnu.org Subject: Closing bug 6674 Date: Mon, 02 Aug 2010 22:17:31 +0200 Message-ID: <87lj8obwh0.fsf@telefonica.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6674-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Patch committed. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 22:55:48 2010 Received: (at submit) by debbugs.gnu.org; 3 Aug 2010 02:55:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og7fQ-0004vK-0K for submit@debbugs.gnu.org; Mon, 02 Aug 2010 22:55:48 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og7fO-0004vF-Ml for submit@debbugs.gnu.org; Mon, 02 Aug 2010 22:55:47 -0400 Received: from lists.gnu.org ([199.232.76.165]:43977) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Og7fn-00049y-Dy for submit@debbugs.gnu.org; Mon, 02 Aug 2010 22:56:11 -0400 Received: from [140.186.70.92] (port=56317 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Og7fm-0005VB-5O for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 22:56:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Og7fk-0006iM-Sg for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 22:56:10 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:45178) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Og7fk-0006i9-M8 for bug-gnu-emacs@gnu.org; Mon, 02 Aug 2010 22:56:08 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L6K000002TIXF00@a-mtaout23.012.net.il> for bug-gnu-emacs@gnu.org; Tue, 03 Aug 2010 05:56:07 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.247.236]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6K00NV22TI5B60@a-mtaout23.012.net.il>; Tue, 03 Aug 2010 05:56:07 +0300 (IDT) Date: Tue, 03 Aug 2010 05:56:09 +0300 From: Eli Zaretskii Subject: Re: bug#6674: [PATCH fixed] bug#6674: fix assignment of grep-find-use-xargs on Windows/MS-DOS In-reply-to: <8739uwdbz7.fsf@telefonica.net> To: =?UTF-8?Q?=C3=93scar?= Fuentes Message-id: <83wrs8xv3q.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <878w564xtc.fsf@telefonica.net> <87vd8a2rxg.fsf@telefonica.net> <87r5iy2ptw.fsf@telefonica.net> <83vd8acbbv.fsf@gnu.org> <87eiey2apg.fsf@telefonica.net> <4C569D60.5040804@gmail.com> <8739uxdnib.fsf_-_@telefonica.net> <87vd7sdhxu.fsf_-_@telefonica.net> <831vagzvcp.fsf@gnu.org> <8739uwdbz7.fsf@telefonica.net> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > From: =C3=93scar Fuentes > Date: Mon, 02 Aug 2010 21:57:16 +0200 > Cc:=20 >=20 > > Better yet, why not use memcpy etc. instead of _snprintf; you don= 't > > really need any formatting features anyway. >=20 > It uses >=20 > "\"%s\"" > " %s" > " /e:%d /c %s" >=20 > and more. Of which only %d really needs printf-like facility. The rest just copy strings to a buffer. From unknown Sun Jun 22 11:31:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 31 Aug 2010 11: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