-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add docs for showing Emacs in spotlight #517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea, but I would add this to caveats section of the formula itself. Even more, I would provide a Apple Script one-liner that will create alias for you. If you need help with that, let me know.
The problem with this proposed documentation is that you need to know installation location, which differs from platform to platform (Apple Silicon and Intel) and from Emacs version.
README.org
Outdated
@@ -336,6 +339,20 @@ Knows issues: | |||
| =--with-retro-sink-bw-icon= | Unknown | [[/icons/preview/retro-sink-bw_128.png]] | [[https://www.teuton.org/~ejm/emacsicon/][→ Link]] | | |||
| =--with-retro-sink-icon= | [[https://www.teuton.org/~ejm/][→ Erik Mugele]] | [[/icons/preview/retro-sink_128.png]] | [[https://www.teuton.org/~ejm/emacsicon/][→ Link]] | | |||
| =--with-spacemacs-icon= | [[https://github.com/nashamri][→ Nasser Alshammari]] | [[/icons/preview/spacemacs_128.png]] | [[https://github.com/nashamri/spacemacs-logo][→ Link]] | | |||
** Spotlight Alias | |||
*** Apple Silicon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aliases work the same regardless of the platform. So I would remove this distinction.
README.org
Outdated
@@ -336,6 +339,20 @@ Knows issues: | |||
| =--with-retro-sink-bw-icon= | Unknown | [[/icons/preview/retro-sink-bw_128.png]] | [[https://www.teuton.org/~ejm/emacsicon/][→ Link]] | | |||
| =--with-retro-sink-icon= | [[https://www.teuton.org/~ejm/][→ Erik Mugele]] | [[/icons/preview/retro-sink_128.png]] | [[https://www.teuton.org/~ejm/emacsicon/][→ Link]] | | |||
| =--with-spacemacs-icon= | [[https://github.com/nashamri][→ Nasser Alshammari]] | [[/icons/preview/spacemacs_128.png]] | [[https://github.com/nashamri/spacemacs-logo][→ Link]] | | |||
** Spotlight Alias | |||
*** Apple Silicon | |||
Symlinking (via ~ln -s~) ~Emacs.app~ won't be visible in Spotlight (It did not work for me even after reboot). However creating an Alias through Finder worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rephrase it to be less personalized. E.g. Spotlight doesn't pick up symlinks, so you have to create an alias, do blah-blah.
Just to explain a little bit more the idea I proposed. Today we have the following caveats section:
It is defined in each formula like this: homebrew-emacs-plus/Formula/[email protected] Lines 246 to 258 in 85c84fd
I propose to either completely remove osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@29/Emacs.app" at POSIX file "/Applications"' The good thing is that caveats can be constructed using some path variables: osascript -e 'tell application "Finder" to make alias file to posix file "#{prefix}/Emacs.app" at POSIX file "/Applications"' This section appears after you install Emacs+ and when you run WDYT? |
+1 to your solution. I ran into this snag and the osascript worked great for me! I usually use "Emacs for OS X", but tried your distro for native-comp + Emacs 29 and it's working awesome! The symlink solution also doesn't give me the icon, which was confusing, and opens a terminal before it opens Emacs. The alias is great and I think putting it in Thank you for working on this fantastic version of Emacs ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
This looks great! The script worked for me as well (showed up in spotlight). I made changes per your suggestions, but I don't see any reason to include my doc request if the caveat will cover that? I also don't see why you can't just call the osascript automatically in the brew file? I am not very familiar with brew's install process, but I would think you can call this osascript. |
Sorry that I was MIA for so long. I was working so much that I didn't really dev much in personal time (sadly work doesn't use macOS). But, hopefully this is fixed? I still see that it can't be rebased due to conflicts. I thought I resolved them, so not sure. I don't work too much with merging forks into a master branch. |
Fixed by #642 |
Personally, I love to launch apps through Spotlight. Symlinking (
ln -s
) theEmacs.app
to/Applications
did not make the link/app to show in Spotlight (even after reboot). So, I found an example on SO that worked using Finder'sCreate Alias
here. I figured others would like to do this :)I looked over the Development Guidelines and I didn't see any specific rules on docs, but please let me know if you prefer any other phrasing or ordering :)