Saturday, June 14, 2008

Emacs Tip: A Key to open the Current Folder in Finder

After reading Aruns tip on opening current folder in explorer, I had to create something similar for OS X.
Here it is:

(defun finder ()
"Launch the Finder in the current directory"
(interactive)
(shell-command "open .")
)

(global-set-key [f6] 'finder)

I placed this in my .emacs config file. Its currently set to F6, but you can change it to whatever key you'd like. I'm using Carbon Emacs. Its rough, and I haven't used it much but it seems to work.