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

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 2 Mar 2009 05:45:03 UTC

Severity: minor

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: bug#2536: 23.0.90; ! in Dired does not shell-quote the command name and args
Date: Sun, 1 Mar 2009 21:36:18 -0800
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)'
 





This bug report was last modified 16 years and 103 days ago.

Previous Next


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