* find-dired problems
@ 2002-12-11 22:47 Timur Aydin
2002-12-12 6:24 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Timur Aydin @ 2002-12-11 22:47 UTC (permalink / raw)
Hi,
I'm having trouble getting "find-dired" to behave correctly.
Here is what I do:
1) I open a directory using dired
2) I do M-x find-dired, accept the directory offered and specify
Makefile as the file to find.
Here is what emacs comes back with:
d:/BCMDEV/:
find . \( Makefile \) -exec ls -ld {} \;
find: paths must precede expression
Usage: find [path...] [expression]
find exited abnormally with code 1 at Thu Dec 12 00:39:28
I tried using find-name-dired and find-grep-dired. All of them give
errors:
find-name-dired, directory is d:/BCMDEV, pattern is Mak*
d:/BCMDEV/:
find . \( -name 'Mak*' \) -exec ls -ld {} \;
find: missing argument to `-exec'
find exited abnormally with code 1 at Thu Dec 12 00:45:04
find-grep-dired, directory is d:/BCMDEV, pattern is ALIGN
d:/BCMDEV/:
find . \( -type f -exec grep -q ALIGN {} \; \) -exec ls -ld {} \;
find: missing argument to `-exec'
find exited abnormally with code 1 at Thu Dec 12 00:46:35
What am I doing wrong?
I am using emacs 21.2 on W2000 and Cygwin is installed on this
system. Cygwin is located in c:\cygwin and:
HOMEDRIVE=C:
HOMEPATH=\cygwin\home\tayd.
--
Timur.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: find-dired problems
2002-12-11 22:47 find-dired problems Timur Aydin
@ 2002-12-12 6:24 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2002-12-12 6:24 UTC (permalink / raw)
On 12 Dec 2002, Timur Aydin wrote:
> d:/BCMDEV/:
> find . \( Makefile \) -exec ls -ld {} \;
> find: paths must precede expression
> Usage: find [path...] [expression]
>
> find exited abnormally with code 1 at Thu Dec 12 00:39:28
I'm guessing that the problem is caused by the shell used by Emacs on
your platform when it runs find-dired. The above command that invokes
`find' assumes a Unixy shell, and uses \ to quote special characters. If
Emacs invokes the Windows shell (such as cmd.exe), those backslashes are
left alone and wind up confusing `find' which doesn't expect them.
Try forcing Emacs to invoke the Cygwin port of Bash as the shell, and the
problems might go away.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-12 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-11 22:47 find-dired problems Timur Aydin
2002-12-12 6:24 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).