From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6784: bug#7785: rgrep is broken on woe32 Date: Thu, 06 Jan 2011 07:09:10 -0500 Message-ID: References: <87d3oc17oo.fsf@telefonica.net> <87k4ijxeh2.fsf@wanadoo.es> <874o9nx9vx.fsf@wanadoo.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1294316652 24910 80.91.229.12 (6 Jan 2011 12:24:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 Jan 2011 12:24:12 +0000 (UTC) Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org, 6784@debbugs.gnu.org To: Sam Steingold Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 06 13:24:07 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Paosx-0004TK-Cp for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Jan 2011 13:24:07 +0100 Original-Received: from localhost ([127.0.0.1]:56462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Paosw-0001Ng-Ka for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Jan 2011 07:24:06 -0500 Original-Received: from [140.186.70.92] (port=58209 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Paosk-0001Kr-QJ for bug-gnu-emacs@gnu.org; Thu, 06 Jan 2011 07:23:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Paosj-00059L-1S for bug-gnu-emacs@gnu.org; Thu, 06 Jan 2011 07:23:54 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Paosi-00059H-Uv for bug-gnu-emacs@gnu.org; Thu, 06 Jan 2011 07:23:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PaoYY-0006wA-K7; Thu, 06 Jan 2011 07:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jan 2011 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6784 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 6784-submit@debbugs.gnu.org id=B6784.129431532526603 (code B ref 6784); Thu, 06 Jan 2011 12:03:02 +0000 Original-Received: (at 6784) by debbugs.gnu.org; 6 Jan 2011 12:02:05 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PaoXc-0006uy-VB for submit@debbugs.gnu.org; Thu, 06 Jan 2011 07:02:05 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PaoXZ-0006uP-A9; Thu, 06 Jan 2011 07:02:01 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PaoeU-0001fV-Rz; Thu, 06 Jan 2011 07:09:10 -0500 In-reply-to: (message from Sam Steingold on Wed, 5 Jan 2011 17:43:15 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 06 Jan 2011 07:03:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43144 Archived-At: > X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, > RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_DKIM_INVALID autolearn=ham version=3.3.1 > Date: Wed, 5 Jan 2011 17:43:15 -0500 > From: Sam Steingold > Cc: Eli Zaretskii , 7785@debbugs.gnu.org > > On Wed, Jan 5, 2011 at 5:29 PM, Óscar Fuentes wrote: > > > > Maybe it is related to this: > > > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6784 > > > > definitely. is that bug going to be fixed? The discussions in that bug report concluded that the program file name after the pipe needs to be quoted, in order for it to work with file names that use forward- and back-slashes alike. I can solve that problem for rgrep (and for other similar commands) by tweaking the templates used by grep.el, so as to quote the %s after the pipe character `|'. Would that be an okay solution? The other alternative I thought about, to fix this inside cmdproxy, has a disadvantage that the command semantics cannot be easily determined at such a low level. The first word after the `|' might not always be a name of an executable file, or it could already be quoted in some ingenious ways, or it might be a part of a quoted pipe that is intended to survive unaltered, to be passed to some other program and not executed as a shell pipeline. Even if we teach cmdproxy about all of these use-cases and write/debug code to handle each and every one of them, we will certainly miss some. We will also force this quoting on commands typed interactively, so users lose the fire escape they can use now to quote or not to quote. As a general principle, I believe that the level which conses the command line is where such decision should be made, because that level surely knows the context, and knows _exactly_ where are the parts that need quoting. The disadvantage is, of course, that similar solutions will have to be implemented for each Emacs command that launches a shell pipeline. But I don't believe there are many of those. Comments?