--- Begin Message ---
Subject: |
23.0.90; `system-type' test in `shell-quote-wildcard-pattern' |
Date: |
Sun, 8 Mar 2009 23:23:39 -0700 |
This is not so much a bug report as a report of a possible bug, or at
least a question.
The code of `shell-quote-wildcard-pattern' has this test:
(memq system-type '(ms-dos windows-nt cygwin)). Looking at that
code, the inclusion of `cygwin' here seems suspect to me.
The Elisp manual says only that a `system-type' of `cygwin' means
Emacs running on Cygwin ("type of operating system Emacs is operating
on"). Dunno what that means, really, but I'm guessing that such a
system would use a shell, such as `bash', that treats characters in
file names similarly to how `bash' treats them for GNU/Linux or UNIX.
I use Emacs on Windows, but not built on Cygwin. I use it with Cygwin
and with `bash' as my shell, however, and that is how the shell
behaves for me. I have no problem with `shell-quote-wildcard-pattern'
AFAIK (my `system-type' is `windows-nt'), but I'm guessing that
someone with a `system-type' of `cygwin' might have trouble with it.
If these guesses are wrong, then please ignore this report.
If these guesses are correct, then perhaps `cygwin' should be removed
from that `system-type' test. The code would then treat `cygwin' Emacs
like Emacs on UNIX or GNU/Linux, as far as quoting file-name chars in
shell commands is concerned.
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)'
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#2607: 23.0.90; `system-type' test in `shell-quote-wildcard-pattern' |
Date: |
Sat, 28 Mar 2009 15:27:04 +0300 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: 2607@emacsbugs.donarmstrong.com, drew.adams@oracle.com
> Date: Tue, 10 Mar 2009 22:02:30 -0400
>
> I think I understand: idempotency is actually not important, and is not
> really what is meant by the 2 lines.
> Indeed (shell-quote-wildcard-pattern "\\'foo*") => "\\\\'foo*"
> so it's not idempotent: \ can be used to escape [*?\] but not [;<>&|()'"#$].
>
> How 'bout something like:
>
> Quote characters special to the shell in pattern, leave wildcards alone.
>
> PATTERN should be a file-name wildcard pattern suitable for the
> underlying filesystem. PATTERN can use \ under Unix and " in Windows
> to quote wildcard characters.
I installed something similar.
--- End Message ---