help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] find-dired does not work on emacs24 + win + mingw


From: sthfrnth
Subject: Re: [h-e-w] find-dired does not work on emacs24 + win + mingw
Date: Sat, 28 Jan 2012 20:21:26 +0800

Here is my result for your reference:

E:\tmp>ls
2  2.c  echocmd.c  echocmd.exe  hello.c  hello.o

E:\tmp>echocmd "*find*"
`echocmd  "*find*"'
0: `echocmd'
1: `*find*'

E:\tmp>echocmd *.c
`echocmd  *.c'
0: `echocmd'
1: `2.c'
2: `echocmd.c'
3: `hello.c'

E:\tmp>echocmd "*.c"
`echocmd  "*.c"'
0: `echocmd'
1: `2.c'
2: `echocmd.c'
3: `hello.c'

E:\tmp>

I think quote is not the main problem. The find.exe in your port only works when "*" is on left side of name:

E:\tmp>find . -name "*cmd*"
find: paths must precede _expression_
Usage: find [-H] [-L] [-P] [path...] [_expression_]

E:\tmp>find . -name *cmd*
find: paths must precede _expression_
Usage: find [-H] [-L] [-P] [path...] [_expression_]

E:\tmp>find . -name *cmd.c
./echocmd.c

E:\tmp>find . -name echo*
find: paths must precede _expression_
Usage: find [-H] [-L] [-P] [path...] [_expression_]

E:\tmp>find . -name "*cmd.c"
./echocmd.c

E:\tmp>find . -name "echo*"
find: paths must precede _expression_
Usage: find [-H] [-L] [-P] [path...] [_expression_]

E:\tmp>


On Sat, Jan 28, 2012 at 8:04 PM, Eli Zaretskii <address@hidden> wrote:
> From: Juanma Barranquero <address@hidden>
> Date: Sat, 28 Jan 2012 12:29:23 +0100
> Cc: sthfrnth <address@hidden>, address@hidden
>
> I'm also on W7 (64-bit, like the OP), and I see the problem, too.

You mean, the find.exe from my port doesn't work with quoted
wildcards?

> >  emacs -Q -batch --eval "(princ (directory-files \".\" nil \"?*\\.c\\'\"))"
> >
> > If quoted arguments work "as I'd expect" (i.e. quotes are removed,
> > unless escaped by a backslash, in which case the backslash is removed
> > and the quote stays), then this command should display the list of all
> > *.c files in the directory where you invoke this command.
>
> It displays the list of .c files, as expected:

Then something was wrong with my reasoning...  Hm...

If you compile the simple program below, and then type

 echocmd "*find*"

what do you see?  And what do you see if you type

 echocmd *.c

and

 echocmd "*.c"

in a directory with C files?

--------------------------- echocmd.c -----------------------
#include <stdio.h>
#include <windows.h>

int main (int argc, char *argv[])
{
 int i = 0;

 printf ("`%s'\n", GetCommandLine ());
 while (argc--)
   printf ("%d: `%s'\n", i++, *(argv++));
 return 0;
}
-----------------------------------------------------------------






reply via email to

[Prev in Thread] Current Thread [Next in Thread]