Show file in Finder

This is a tip for Mac users. Use M-x reveal-in-finder to show the current file in a new finder window. If you use this in dired, it will show the file at the cursor in a new finder window.

The reveal-in-finder package may be installed by default with your emacs, but if not, you can install it through the package manager using package-list-packages.

I find this useful for example to quickly attach files to emails in thunderbird. I just reveal the file in finder and then drag it onto my compose window in thunderbird.

  • stefanavey

    I use the same kind of trick to quickly attach files to e-mails in linux. This simple function reveals the file in the default file browser in Fedora GNOME (nautilus):

    (defun spa-open-nautilus()
    “Open the `files’ browser `nautilus’ with the contents of the current path”
    (interactive)
    (call-process-shell-command (concatenate ‘string “nautilus ” “‘” (or (buffer-file-name) default-directory) “‘” ” &”));
    )
    (global-set-key “C-co” ‘spa-open-nautilus)