[Unsolved] (Homebrew) Emacs.app doesn’t appear in Spotlight

[Unsolved] (Homebrew) Emacs.app doesn’t appear in Spotlight

After using brew linkapps emacs Emacs still didn’t show in Spotlight for me.
I googled and found this issue https://github.com/Homebrew/legacy-homebrew/issues/4635 TL;DR nothing got fixed on the homebrew side.

Caskroom puts stuff into /opt where as Homebrew puts stuff into /usr/local which is why that it works fine.

According to this comment using an OS X “Alias” will fix it. But that didn’t work for me on El Capitan.

Apparently moving Emacs.app may have problems due to Homebrew passing --disable-ns-self-contained

Which according to configure file says “disable self contained build under NeXTstep” but does that mean it doesn’t come with the emacs binary and just references it on disk? Which would be ok in our case. According to a comment on nakkaya.com “To also have the console emacs one can add the –disable-ns-self-contained flag to the configure.”. Which makes sense, I’m going to make an educated guess and say “the Emacs.app” that is built just references the just build Emacs binary and so moving it to another system where it’s not in the same location may not work.

However then in the caveats of the formula it says

A command line wrapper for the cocoa app was installed to:
/usr/local/Cellar/emacs/24.5/bin/emacs

However /usr/local/bin/emacs is a symbolic link to ../Cellar/emacs/24.5/bin/emacs and so running emacs doesn’t load the CLI version but the Cocoa/GUI version.

It appears the problem is that Spotlight does not index hidden directories and /usr is marked as hidden.
Temp Solution:
I have my terminal open all the time anyway so running emacs is okay but if you know the solution please comment

Leave a Reply

Your email address will not be published. Required fields are marked *