Oleg Pavliv
Oleg Pavliv

Reputation: 21172

emacs 23.1 windows find-grep

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

Upvotes: 2

Views: 814

Answers (2)

genehack
genehack

Reputation: 140748

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...)

Upvotes: 2

Trey Jackson
Trey Jackson

Reputation: 74440

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).

Upvotes: 1

Related Questions