Jutting Bytes

Digressions of a research engineer

Fixing the Brew Linkapps Issue on MacOSX

| Comments

Today, I have been extensively working on my emacs prolusion and updated emacs to its current HEAD version, that is,

To do so, I have obviously used brew:

$ brew reinstall emacs --use-git-head --with-cocoa --HEAD

This builds Emacs.app into brew’s cellar, and to have it into your /Applications folder, brew invites you to invoke the following command:

$ brew linkapps emacs

This does the job, it symlinks Emacs.app from brew’s cellar to the Applications folder but it appears that symlinks are not supported by Spotlight.

To fix this, I found a nice one-liner solution. First remove the symlink:

$ rm /Applications/Emacs.app


$ osascript -e 'tell application "Finder" to make alias file to POSIX file "/usr/local/opt/emacs/Emacs.app" at POSIX file "/Applications"'

Spotlight will now index Emacs.app. The same procedure applies for other application bundles provided by brew such as MacVim.app.