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

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

Warning to those using rgrep on Mac OS X


From: Perry Smith
Subject: Warning to those using rgrep on Mac OS X
Date: Mon, 17 Dec 2012 12:03:44 -0600

I'm using Mac OS 10.7.5 and emacs 24.1.1

Over the weekend I discovered that the command line that rgrep produces does 
not work.  This is not an emacs issue... I'm just trying to warn people.

I was not able to 100% characterize it but it appears that if the matches are 
for files very far down the directory structure, *sometimes* the command will 
just return immediately.  I was matching create_view_specs and the file that 
should have matched was at 

.bundle/gems/ruby/1.9.1/gems/rspec-rails-2.12.0/lib/generators/rspec/view/view_generator.rb

If I started at the file's directory, it matched.  If I moved up one or two 
directories, it matched.  If I moved up three directories, it would match but 
the string produced was not what the emacs pattern was looking for.  If I moved 
up four directories, the command would just immediately return.  Doing the same 
from the command line had the same results so its not an emacs bug.

The command is producing the -exec grep ..... +  version. grep-find-use-xargs 
is set to exec-plus

There is no simple way to get setting grep-find-use-xargs to 'gnu to work 
because out of the box, emacs adds in -e to xargs (which is non-standard and 
the Mac doesn't have it).  I don't really get what the -e with no string is 
trying to do.  I'm also slightly puzzled why the grep-probe didn't try other 
argument patterns... I can't say I 100% understand the code.

If I hand edit the command using -print0 | xargs -0, it does match and then 
emacs doesn't recognize the string grep issues.

Perry




reply via email to

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