homebrew-emacs-plus icon indicating copy to clipboard operation
homebrew-emacs-plus copied to clipboard

Change post-install message for linking to Application

Open thegeorgeous opened this issue 4 years ago • 8 comments

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

thegeorgeous avatar Mar 23 '21 17:03 thegeorgeous

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 avatar Mar 24 '21 07:03 d12frosted

@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.

thegeorgeous avatar Mar 24 '21 07:03 thegeorgeous

FYI @thegeorgeous, since Emacs.app is a directory, you need to specify cp -r for recursive copying to the /Applications directory.

jmhammond avatar Mar 24 '21 13:03 jmhammond

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?

d12frosted avatar Mar 27 '21 07:03 d12frosted

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?

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.

jmhammond avatar Mar 27 '21 12:03 jmhammond

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"

d12frosted avatar Mar 29 '21 06:03 d12frosted

Hey guys, check #345. This is why build (macos-11.0, --with-x11) failed.

wildwestrom avatar Apr 22 '21 23:04 wildwestrom

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:  image

webframp avatar Apr 13 '22 20:04 webframp

You can tell Alfred to include alias files.

Alfred Settings -> Features -> Default Results -> Advanced Add com.apple.alias-file

marcus233 avatar Mar 30 '23 04:03 marcus233

Fixed by #642

d12frosted avatar Dec 21 '23 22:12 d12frosted