0

find-name-dired is raising the following error. Is the format incorrect?

M-x find-name-dired RET; Find-name (directory): ~/test RET; Find-name (filename wildcard): test.txt RET

Result:
  /path/to/home/test/:
  c:/cygwin/bin/find.exe . \( -iname test.txt \) -ls
  /usr/bin/bash: -c: line 0:   syntax error near unexpected token `('
  /usr/bin/bash: -c: line 0: `c:/cygwin/bin/find.exe . \\( -iname test.txt \\) -ls'

Additional Info: find-dired also results in same error.

M-x find-dired RET; Run find in directory: ~/test/ RET; Run find (with args): -iname test.txt RET;

Result:
/path/to/home/test/:
c:/cygwin/bin/find.exe . \( -iname "test.txt" \) -ls
  /usr/bin/bash: -c: line 0:   syntax error near unexpected token `('
  /usr/bin/bash: -c: line 0: `c:/cygwin/bin/find.exe . \\( -iname \test.txt\ \\) -ls'

Also seeing the following error in Messages buffer, in both cases:

error in process sentinel: Wrong type argument: integer-or-marker-p, nil [2 times]
Aravind
  • 31
  • 3
  • My guess is there's too much escaping going on. What happens if you remove the `\\` characters? – wvxvw Sep 16 '21 at 11:48
  • How do I do that? I mean, which variable controls the customization of find command? – Aravind Sep 16 '21 at 13:16
  • I thought it is just editable in the minibuffer... isn't it? – wvxvw Sep 16 '21 at 13:32
  • No. It is an interactive command. Takes the search directory and file name as inputs. – Aravind Sep 16 '21 at 14:27
  • What command exactly are you running? Are you running it interactively or from another function? – wvxvw Sep 16 '21 at 14:28
  • M-x find-name-dired RET; Find-name (directory): ~/test RET; Find-name (filename wildcard): test.txt RET – Aravind Sep 16 '21 at 14:32
  • Oh, I thought it was `M-x find-dired`. – wvxvw Sep 16 '21 at 14:39
  • What happens if you try `c:/cygwin/bin/find.exe . \( -iname test.txt \) -ls` directly (outside Emacs)? What happens if you instead try `c:/cygwin/bin/find.exe . ( -iname test.txt ) -ls`? What happens if you substitute the full directory name instead of using `~/test`? When I use `interactive` with code `D` and enter `~/something` the arg read is just `~/something` - it's not `.` as in what you show. Are you sure you typed `~/test`? – Drew Sep 16 '21 at 21:55
  • `c:/cygwin/bin/find.exe ~/test \( -iname test.txt \) -ls` works outside Emacs. `c:/cygwin/bin/find.exe ~/test ( -iname test.txt ) -ls` gives `-bash: syntax error near unexpected token `('` outside Emacs. I typed ~/test. I get '.' in the output find command. The output window has the full path in the first line, then the find command line, then the error messages. – Aravind Sep 17 '21 at 03:37

0 Answers0