GNU bug report logs - #2536
23.0.90; ! in Dired does not shell-quote the command name and args

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: "Drew Adams" <drew.adams@HIDDEN>; dated Mon, 2 Mar 2009 05:45:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 2536@HIDDEN:


Received: (at 2536) by emacsbugs.donarmstrong.com; 6 Mar 2009 22:09:46 +0000
From drew.adams@HIDDEN Fri Mar  6 14:09:46 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n26M9hYq024372
	for <2536@HIDDEN>; Fri, 6 Mar 2009 14:09:44 -0800
Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n26MAjNU002141
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 6 Mar 2009 22:10:46 GMT
Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70])
	by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n26M9amh025075;
	Fri, 6 Mar 2009 22:09:38 GMT
Received: from dradamslap1 (/141.144.64.121)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Fri, 06 Mar 2009 22:09:32 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <2536 <at> debbugs.gnu.org>,
        "'Andreas Schwab'" <schwab@HIDDEN>
References: <005001c99af8$d06051b0$0200a8c0@HIDDEN><005601c99afe$af405790$0200a8c0@HIDDEN><m2prh0wa5i.fsf@HIDDEN> <007601c99b49$ad4fb610$0200a8c0@HIDDEN>
Subject: RE: bug#2536: 23.0.90;! in Dired does not shell-quote the command name and args
Date: Fri, 6 Mar 2009 14:09:36 -0800
Message-ID: <008b01c99ea8$3cac7800$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <007601c99b49$ad4fb610$0200a8c0@HIDDEN>
Thread-Index: AcmbGJbmG/ob341PRvKcM+Jer1Vq7gAMOCbwANZFqaA=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Source-IP: acsmt700.oracle.com [141.146.40.70]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090206.49B19F1E.0237:SCFSTAT928724,ss=1,fgs=0

> From: Drew Adams Sent: Monday, March 02, 2009 7:15 AM
> > > In sum, I don't have any insight about what fix is needed, 
> > > but there is definitely a problem, at least for MS Windows,
> > > where spaces in file names are common.
> > 
> > If you want to use shell meta characters on the command line 
> > it is your own responsibility to add proper quoting.
> > Note that file name completion
> > (ie. minibuffer-complete-shell-command) will DTRT here.
> 
> Yes, I realized after I sent the report that there is no way 
> for Emacs to distinguish a file name with spaces from separate
> arguments. You can close this bug, I guess.

Actually, no, file name completion does *not* DTRT here.
Similarly, for `&' and `M-!'.

c:/Prog TAB will correctly complete to c:/Program Files/ - yes.
But c:/Program Files/ad TAB will *not* complete to
c:/Program Files/Adobe/, and so on.

You cannot use completion to get the shell command (program)
c:/Program Files/Adobe/Framemaker7.2/FrameMaker.exe.  And you
cannot even complete c:/Program  (with a trailing space) to
c:/Program Files/.  The shell thinks the executable is just
c:/Program, and it tries to complete local file names as
shell arguments to pass to that program.

And anyway, if you could complete to the executable
c:/Program Files/Adobe/Framemaker7.2/FrameMaker.exe, then bash
would just complain that there is no such file: c:/Program,
just as it does if you type all of that in and hit RET.

Again, I'm not sure what the ideal solution is. It's true that there is no way
to automatically tell in all cases whether a space separates arguments or is
part of a file name. 

But the existing file-name completion is in any case a bit brain-dead. 

It knows that c:/Prog completes to c:/Program Files/, but it doesn't know to
complete c:/Program Files/ad to c:/Program Files/Adobe.  And in such a case
there is *no ambiguity* over embedded spaces vs argument separators.  There's
nothing tricky happening here, in theory.

The problem is that during completion of c:/Prog Emacs knows that this is a file
name with a space, but as soon as you type ad TAB, it forgets that previous
knowledge and thinks you are trying to complete an argument Files/ad, to be
passed to command c:/Program.  Silly.

The file-name completion could be made more robust. The only potential problem
occurs when there is true ambiguity between an existing file name, with spaces,
and an existing file name whose name is a prefix up to a space.  For example, if
both a directory c:/Program Files/ and an executable c:/Program exist, then it's
not clear whether the space after c:/Program is embedded in a file name or
separates the command name from an argument.

If priority were always given to the longer prefix in such a case, then `!',
`&', and `M-!' would be much more usable. Then, Emacs would not try to look at
Files/ad as a potential argument.

In the uncommon case of true ambiguity (e.g. both dir c:/Program Files/ and
executable c:/Program), a user could anyway manually add quote marks as needed -
as s?he *must* do now in all cases where there are spaces in file names.







Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#2536; Package emacs. Full text available.

Message received at 2536@HIDDEN:


Received: (at 2536) by emacsbugs.donarmstrong.com; 2 Mar 2009 15:14:55 +0000
From drew.adams@HIDDEN Mon Mar  2 07:14:55 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from rgminet11.oracle.com (rcsinet11.oracle.com [148.87.113.123])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n22FEqQ3024688
	for <2536@HIDDEN>; Mon, 2 Mar 2009 07:14:53 -0800
Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235])
	by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n22FHMZU022881
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 2 Mar 2009 15:17:23 GMT
Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84])
	by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n22FEsEi028236;
	Mon, 2 Mar 2009 15:14:55 GMT
Received: from dradamslap1 (/24.5.128.33)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Mon, 02 Mar 2009 15:14:41 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Andreas Schwab'" <schwab@HIDDEN>
Cc: <2536 <at> debbugs.gnu.org>
References: <005001c99af8$d06051b0$0200a8c0@HIDDEN><005601c99afe$af405790$0200a8c0@HIDDEN> <m2prh0wa5i.fsf@HIDDEN>
Subject: RE: bug#2536: 23.0.90; ! in Dired does not shell-quote the command name and args
Date: Mon, 2 Mar 2009 07:15:08 -0800
Message-ID: <007601c99b49$ad4fb610$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <m2prh0wa5i.fsf@HIDDEN>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
Thread-Index: AcmbGJbmG/ob341PRvKcM+Jer1Vq7gAMOCbw
X-Source-IP: acsmt706.oracle.com [141.146.40.84]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A010206.49ABF7E3.0132:SCFSTAT928724,ss=1,fgs=0

> > In sum, I don't have any insight about what fix is needed, 
> > but there is definitely a problem, at least for MS Windows,
> > where spaces in file names are common.
> 
> If you want to use shell meta characters on the command line 
> it is your
> own responsibility to add proper quoting.  Note that file name
> completion (ie. minibuffer-complete-shell-command) will DTRT here.

Yes, I realized after I sent the report that there is no way for Emacs to
distinguish a file name with spaces from separate arguments. You can close this
bug, I guess.





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#2536; Package emacs. Full text available.

Message received at 2536@HIDDEN:


Received: (at 2536) by emacsbugs.donarmstrong.com; 2 Mar 2009 09:23:44 +0000
From whitebox@HIDDEN Mon Mar  2 01:23:44 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n229NerV031765
	for <2536@HIDDEN>; Mon, 2 Mar 2009 01:23:42 -0800
Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149])
	by mail-out.m-online.net (Postfix) with ESMTP id DD4FF1C01F86;
	Mon,  2 Mar 2009 10:23:40 +0100 (CET)
Received: from localhost (dynscan2.mnet-online.de [192.168.1.215])
	by mail.m-online.net (Postfix) with ESMTP id BF947901F5;
	Mon,  2 Mar 2009 10:23:39 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.3.149])
	by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024)
	with ESMTP id 1QlrdRkKjfCp; Mon,  2 Mar 2009 10:23:38 +0100 (CET)
Received: from igel.home (DSL01.83.171.157.84.ip-pool.NEFkom.net [83.171.157.84])
	by mail.mnet-online.de (Postfix) with ESMTP;
	Mon,  2 Mar 2009 10:23:38 +0100 (CET)
Received: by igel.home (Postfix, from userid 501)
	id 24C3D10D80C; Mon,  2 Mar 2009 10:23:37 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Cc: 2536 <at> debbugs.gnu.org
Subject: Re: bug#2536: 23.0.90; ! in Dired does not shell-quote the command name and args
References: <005001c99af8$d06051b0$0200a8c0@HIDDEN>
	<005601c99afe$af405790$0200a8c0@HIDDEN>
X-Yow: I always have fun because I'm out of my mind!!!
Date: Mon, 02 Mar 2009 10:23:37 +0100
In-Reply-To: <005601c99afe$af405790$0200a8c0@HIDDEN> (Drew Adams's
	message of "Sun, 1 Mar 2009 22:18:19 -0800")
Message-ID: <m2prh0wa5i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

"Drew Adams" <drew.adams@HIDDEN> writes:

> In sum, I don't have any insight about what fix is needed, but there is
> definitely a problem, at least for MS Windows, where spaces in file names are
> common.

If you want to use shell meta characters on the command line it is your
own responsibility to add proper quoting.  Note that file name
completion (ie. minibuffer-complete-shell-command) will DTRT here.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Acknowledgement sent to Andreas Schwab <schwab@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#2536; Package emacs. Full text available.

Message received at 2536@HIDDEN:


Received: (at 2536) by emacsbugs.donarmstrong.com; 2 Mar 2009 06:18:06 +0000
From drew.adams@HIDDEN Sun Mar  1 22:18:06 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n226I3KE017278
	for <2536@HIDDEN>; Sun, 1 Mar 2009 22:18:04 -0800
Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n226J3mm017222
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 2 Mar 2009 06:19:04 GMT
Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70])
	by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n226HuRF024799;
	Mon, 2 Mar 2009 06:17:57 GMT
Received: from dradamslap1 (/24.5.128.33)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Mon, 02 Mar 2009 06:17:53 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <2536 <at> debbugs.gnu.org>, <emacs-pretest-bug@HIDDEN>
References: <005001c99af8$d06051b0$0200a8c0@HIDDEN>
Subject: RE: bug#2536: 23.0.90;! in Dired does not shell-quote the command name and args
Date: Sun, 1 Mar 2009 22:18:19 -0800
Message-ID: <005601c99afe$af405790$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <005001c99af8$d06051b0$0200a8c0@HIDDEN>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
Thread-Index: Acma+M+5o44W3wcDSwepIGE3USIMGQABHhFA
X-Source-IP: acsmt700.oracle.com [141.146.40.70]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090206.49AB7A13.000F:SCFSTAT928724,ss=1,fgs=0

I said `shell-quote', but I meant `shell-quote-argument' or
`shell-quote-wildcard-pattern'. I'm not real clear on how to use the latter, or
whether either of them might help here. Trying them on my own didn't seem to
work. The `*' after the command/file input was taken as part of the command/file
name, provoking an error (no such file or directory).

In sum, I don't have any insight about what fix is needed, but there is
definitely a problem, at least for MS Windows, where spaces in file names are
common.

I also forgot to mention in the recipe to do this is in a Dired buffer.





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#2536; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 2 Mar 2009 06:18:18 +0000
From drew.adams@HIDDEN Sun Mar  1 22:18:17 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER
	autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n226IFs1017286
	for <submit@HIDDEN>; Sun, 1 Mar 2009 22:18:16 -0800
Received: from mail.gnu.org ([199.232.76.166]:53805 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Le1RQ-0006gl-HX
	for emacs-pretest-bug@HIDDEN; Mon, 02 Mar 2009 01:15:52 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Le1Th-0001if-NG
	for emacs-pretest-bug@HIDDEN; Mon, 02 Mar 2009 01:18:14 -0500
Received: from rcsinet13.oracle.com ([148.87.113.125]:54712 helo=rgminet13.oracle.com)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Le1Th-0001hx-C7
	for emacs-pretest-bug@HIDDEN; Mon, 02 Mar 2009 01:18:13 -0500
Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n226J3mm017222
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 2 Mar 2009 06:19:04 GMT
Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70])
	by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n226HuRF024799;
	Mon, 2 Mar 2009 06:17:57 GMT
Received: from dradamslap1 (/24.5.128.33)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Mon, 02 Mar 2009 06:17:53 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <2536 <at> debbugs.gnu.org>, <emacs-pretest-bug@HIDDEN>
References: <005001c99af8$d06051b0$0200a8c0@HIDDEN>
Subject: RE: bug#2536: 23.0.90;! in Dired does not shell-quote the command name and args
Date: Sun, 1 Mar 2009 22:18:19 -0800
Message-ID: <005601c99afe$af405790$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <005001c99af8$d06051b0$0200a8c0@HIDDEN>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
Thread-Index: Acma+M+5o44W3wcDSwepIGE3USIMGQABHhFA
X-Source-IP: acsmt700.oracle.com [141.146.40.70]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090206.49AB7A13.000F:SCFSTAT928724,ss=1,fgs=0
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1)
X-CrossAssassin-Score: 2

I said `shell-quote', but I meant `shell-quote-argument' or
`shell-quote-wildcard-pattern'. I'm not real clear on how to use the latter, or
whether either of them might help here. Trying them on my own didn't seem to
work. The `*' after the command/file input was taken as part of the command/file
name, provoking an error (no such file or directory).

In sum, I don't have any insight about what fix is needed, but there is
definitely a problem, at least for MS Windows, where spaces in file names are
common.

I also forgot to mention in the recipe to do this is in a Dired buffer.





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#2536; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 2 Mar 2009 05:36:09 +0000
From drew.adams@HIDDEN Sun Mar  1 21:36:09 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n225a6oA006848
	for <submit@HIDDEN>; Sun, 1 Mar 2009 21:36:07 -0800
Received: from mail.gnu.org ([199.232.76.166]:47604 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Le0md-0005fA-Ho
	for emacs-pretest-bug@HIDDEN; Mon, 02 Mar 2009 00:33:43 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Le0ou-0002Pn-Ab
	for emacs-pretest-bug@HIDDEN; Mon, 02 Mar 2009 00:36:05 -0500
Received: from rcsinet12.oracle.com ([148.87.113.124]:44998 helo=rgminet12.oracle.com)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Le0ot-0002Pb-W1
	for emacs-pretest-bug@HIDDEN; Mon, 02 Mar 2009 00:36:04 -0500
Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n225ZvpO031883
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <emacs-pretest-bug@HIDDEN>; Mon, 2 Mar 2009 05:35:59 GMT
Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82])
	by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n225Zt3C011775
	for <emacs-pretest-bug@HIDDEN>; Mon, 2 Mar 2009 05:36:00 GMT
Received: from dradamslap1 (/24.5.128.33)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Mon, 02 Mar 2009 05:35:51 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <emacs-pretest-bug@HIDDEN>
Subject: 23.0.90; ! in Dired does not shell-quote the command name and args
Date: Sun, 1 Mar 2009 21:36:18 -0800
Message-ID: <005001c99af8$d06051b0$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
Thread-Index: Acma+M+5o44W3wcDSwepIGE3USIMGQ==
X-Source-IP: acsmt704.oracle.com [141.146.40.82]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090203.49AB703D.0187:SCFSTAT928724,ss=1,fgs=0
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1)

emacs -Q
 
load library cygwin-mount.el, then setup-cygwin.el:
 
http://www.emacswiki.org/emacs/cygwin-mount.el
http://www.emacswiki.org/emacs/setup-cygwin.el
 
Use /bin/bash.exe as SHELL.
 
Hit `!' on some file.
 
Type the absolute name of an executable file, which name contains a
space. For example: c:/Program Files/Adobe/FrameMaker7.2/FrameMaker.exe.
 
You get an error: /usr/bin/bash: c:/Program: No such file or directory
 
The problem is that the command and its args are not being
shell-quoted, so the file name is truncated at the first space (after
`Program').  The same problem exists for `&' as for `!'.
 
I'm not sure the solution would be as simple as just applying
`shell-quote' to whatever text is entered, since the command is also
supposed to accept some wildcard characters, such as `*'.  (I didn't
check the code - just guessing.)
 
But some fix must be found. Otherwise, `!' and `&' are less than
useful on platforms such as Windows that typically use spaces in file
and directory names.
 
This problem exists in Emacs 22 also. There, there are even more
wildcards to deal with, since `&' is a wildcard for `!'.  For example,
to run `foo' asynchronously, you can enter `foo * &'.
 

In GNU Emacs 23.0.90.1 (i386-mingw-nt5.1.2600)
 of 2009-02-01 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#2536; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.