Skip to content
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

Application is not linked out of box #618

Closed
michaelssingh opened this issue Sep 26, 2023 · 6 comments · Fixed by #642
Closed

Application is not linked out of box #618

michaelssingh opened this issue Sep 26, 2023 · 6 comments · Fixed by #642
Assignees

Comments

@michaelssingh
Copy link

michaelssingh commented Sep 26, 2023

OK, looks like I might have filled that out correct.

One of the immediate issues that I noticed after the installation was that there wasn't an icon for Emacs in the Application Launcher or Spotlight

On my system trying to create a link in /Application resulted in the following error:
ln -s /opt/homebrew/opt/emacs-plus@29/Emacs.app /Applications
Gave an error about read-only file-system

This how I managed to get the icon to appear in the application launcher but it doesn't show up in spotlight
ln -s /opt/homebrew/opt/emacs-plus@29/Emacs.app /System/Volumes/Data/Applications/Emacs.ap

When launching Emacs from here the Application Launcher, why don't we have it call emacsclient -a emacs to connect to server that is already running by default.

@d12frosted
Copy link
Owner

Hey @michaelssingh

Regarding the spotlight/finder - it's a known issue. There were several related issues/prs - #41, #517, #488, #324. I acknowledge that the current instructions are problematic and they do not work. AFAIU the Homebrew-recommended way for apps to appear in applications folder/spotlight/whatever is to use cask (see #41). Unfortunately, I don't have enough time and motivation to tackle this.

I would really appreciate someone to either (a) actually figure out the best way to link the app and update instructions or (b) figure out how to provide cask.

Regarding the .app wrapper for emacsclient. #398 describes some ways to achieve this. Emacs+ could provide some wrapper out of box (although the question about linking strikes again), but it's low on my priority list (unfortunately).

When launching Emacs from here the Application Launcher, why don't we have it call emacsclient -a emacs to connect to server that is already running by default.

Specifically the idea of Emacs.app to launch emacsclient - I am pretty sure that's not what everyone would like to have. Not everyone run the server and more importantly - not everyone want to run the server. That's why I don't touch that 😸

@d12frosted d12frosted changed the title Incomplete installation Application is not linked out of box Sep 26, 2023
@d12frosted
Copy link
Owner

P.S. Hope you don't mind that I changed the title and content to remove irrelevant stuff. Application is not linked OOTB by 'design'.

@michaelssingh
Copy link
Author

michaelssingh commented Sep 27, 2023

Specifically the idea of Emacs.app to launch emacsclient - I am pretty sure that's not what everyone would like to have. Not everyone run the server and more importantly - not everyone want to run the server. That's why I don't touch that 😸

emacsclient has the -a flag which specifies a fallback editor to use if the server is not running

Here's a fish function that does this

function e -d "Starts a GUI emacsclient in a new frame"
  emacsclient -c -a vim $argv > /dev/null &
end

@d12frosted
Copy link
Owner

Vim is definitely not a good fallback 😹 Not because it's vim, but because we are talking about GUI apps. Ok, we could try to run emacs with GUI instead, but then... what if I want to start a new Emacs instance not connected to a running server? IMO it's better to have Emacs.app and EmacsClient.app separately just the way we have it in CLI. This way user gets expected behaviour instead of a 'magical' (or a DWIM) one.

@allen-liaoo
Copy link

Any updates on this or instructions on how to make .app appear in /Applications?

@ryankhart
Copy link

Any updates on this or instructions on how to make .app appear in /Applications?

Right there with you. I wish it did this automatically as well.

However, if you were to brew reinstall emacs-plus@29, for example, you can see a commandline instruction to copy and paste a line that starts with osascript -e 'tell applications "Finder" to make alias [...] and run that command after reinstalling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants