homebrew-emacs-plus
homebrew-emacs-plus copied to clipboard
Change post-install message for linking to Application
Aliased applications don't appear in applications lists created by apps like Spotlight and Alfred. Default cask behaviour is to copy the .app folder to /Applications
Nice, thanks.
BTW, for some reason spotlight finds my Emacs.app without ln -s or copying 🤔 Can't understand how. I am usually starting Emacs with a key chord.
P. S. ignore failed tests, --with-x11 is broken right now.
@d12frosted, I didn't have a problem with links before either. I recently switched to a new Macbook that has M1 and Big Sur and both Spotlight and Alfred were not listing Emacs and it was the only application using symlinks. Removing the link and copying the .app folder fixed it. Not sure what changed, but in any case, I think copying the .app folder should be the standard behaviour.
FYI @thegeorgeous, since Emacs.app is a directory, you need to specify cp -r for recursive copying to the /Applications directory.
What I like about linking is that upgrading/reinstalling of Emacs doesn't require performing any extra steps with Emacs.app in Applications folder. When you copy, you need to copy after each upgrade/reinstall. Maybe the formula should simply copy Emacs.app, so that users do not need to perform any extra steps?
What I like about linking is that upgrading/reinstalling of Emacs doesn't require performing any extra steps with
Emacs.appin Applications folder. When you copy, you need to copy after each upgrade/reinstall. Maybe the formula should simply copyEmacs.app, so that users do not need to perform any extra steps?
That would be huge for new users like me. The is my first Mac and I was confused when I had to do extra steps to get emacs-mac to be picked up by Spotlight.
I tried placing the following code in the end of if (build.with? "cocoa") && (build.without? "x11") block, but it doesn't work. I mean, nothig happens. When I try to put Emacs.app into /Applications, I get an access error (which is expected), so I wanted to put them into user applications folder, but aparently brew doesn't allow it.
+ apps_dir = File.expand_path "~/Applications"
+ mkdir_p apps_dir
+ rm_rf "#{apps_dir}/Emacs.app"
+ cp_r "#{prefix}/Emacs.app", "#{apps_dir}/Emacs.app"
Hey guys, check #345. This is why build (macos-11.0, --with-x11) failed.
This change will probably make for a simpler experience since links aren't found by default. In my case, I added /usr/local/Cellar to my search path for Alfred and it works:

You can tell Alfred to include alias files.
Alfred Settings -> Features -> Default Results -> Advanced
Add com.apple.alias-file
Fixed by #642