[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

I can't execute grep-find.



はらぐちと申します。

Meadow 1.10 で grep-find が動いてくれなくて困っています。
.emacs で以下のように日本語環境と shell 環境を設定しています。

(set-language-environment "Japanese")
(setq shell-file-name "bash"		;; cygwin b20
      explicit-shell-file-name "bash"
      shell-command-switch "-c")

で、

M-x grep-find <RET>
find . -type f -exec grep -n -e 'hoge' {} /dev/null \;

と入力すると

  cd D:\home/
  find . -type f -exec grep -n -e hoge {} /dev/null \;

  grep exited abnormally with code 2 at Tue Mar 07 22:24:10

というように失敗します。また、

(setq grep-find-use-xargs 'gnu)

としておくと、

  cd D:\home/
  find . -type f -print0 | xargs -0 -e grep -n -e 'hoge'

  grep exited abnormally with code 123 at Tue Mar 07 22:11:36

というように失敗してしまいます。
shell-mode で 

[/home]$ bash -c "find . -type f -print0 | xargs -0 -e grep -n -e 'hoge'"

とした場合は期待通りの動作をしてくれます。また M-x grep も
正しく動作しています。cygwin に渡す引数処理に関係していそうな
気はするのですが、どうやって原因を調べればいいのか私には分かりません。
Mailing List のアーカイブも漁ってみましたが、ヒントになりそうな
情報にはたどり着けませんでした。

助言をお願いします。

-- 
原口 秀剛