Using OSX Spotlight from within Emacs

Emacs comes with a ‘locate’ command that uses the locate system command to find files within your system.

On OS X, it is easier to use Spotlight, which is trivial to enable in Emacs.

In your .emacs file, add the following code:

(setq locate-command "mdfind")
Now try: 
M-x locate <enter your search here>

Your search results will be displayed in a new Window.