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, 25.1.50.1.

To do so, I have obviously used brew:

1
$ 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:

1
$ 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:

1
$ rm /Applications/Emacs.app

Then:

1
$ 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.


Comments