tags:

views:

333

answers:

2

I installed the new release of emacs 23.1 and the very first difference I saw is that after M-x find-grep it takes 5-7 sec to show the standard command "find . -type f -print0 | xargs -0 -e grep -n ".

In release notes for 23.1 there is something about "Smarter minibuffer completion". Can I disable this feature and return to the old implementation when the command appeared immediately?

ANSWER: It is necessary to put somewhere in .emacs

(setq grep-highlight-matches nil)

to avoid a call (grep-probe) which takes a long time

+1  A: 

Answering your second question about minibuffer completion, this setting will get you back to the completion used in Emacs 22:

(setq completion-styles '(emacs22))

However, that doesn't address the slowness like you'd hope. The slowness probably has something to do with your system. Maybe the package had to be read in and the disk was busy, or your system was loaded or ... 'find-grep works very speedily for me (and I'd bet the same for most everyone else).

Trey Jackson
It does not help. Well, maybe this problem occurs only on my computer. But it happens all the time whenever I change a directory. And it's enough to switch to emacs-22.3 and the problem disappears.
Oleg Pavliv
+2  A: 

Does it get faster after the first time you run it, or is it consistently slow?

It looks like find-grep (which is just an alias for grep-find, nice!) runs grep-compute-defaults to set up a bunch of meta-information (location of grep, how to invoke find, etc); I wonder if that's the slowness you're seeing? It looks like you may be able to save the value of grep-host-defaults-alist and side-step this process? (With the caveat that if anything ever changes, etc...)

genehack