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.

Advertisement

One thought on “Using OSX Spotlight from within Emacs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.