agzam / spacehammer

Hammerspoon config inspired by Spacemacs
MIT License
556 stars 70 forks source link

Edit-with-emacs is broken in Hammerspoon 0.9.93 (6148) #156

Closed agzam closed 1 year ago

agzam commented 2 years ago

After upgrading to 0.9.93, I have noticed that "edit-with-emacs" doesn't work as before - the edit frame shows up and immediately disappears. Turns out this version of Hammerspoon is missing hs command-line tool in the path.

As a temporary workaround I had to symlink it:

ln -s /usr/local/Caskroom/hammerspoon/0.9.93/Hammerspoon.app/Contents/Frameworks/hs/hs /usr/local/bin/hs

One perhaps even could use a 'stupidly clever'™ way:

ln -s $(brew info hammerspoon | grep $(brew --prefix) | sed 's/ .*//')/Hammerspoon.app/Contents/Frameworks/hs /usr/local/bin/hs

But then, what if Hammerspoon wasn't installed using homebrew?

Anyway It's an upstream issue, and it can be tracked here: https://github.com/Hammerspoon/hammerspoon/issues/3034

HyunggyuJang commented 2 years ago

One perhaps even could use a 'stupidly clever'™ way:

How about handing desired path to hs.ipc.cliInstall? Since I’m using m1 mac, nevertheless, I needed this.

agzam commented 2 years ago

Oh, I completely missed that the fact that this exists. We probably need to explore this and decide where to put the checks and run .cliinstall. Obviously, we don't want to run it every time we need the cli, only once. Thank you for your suggestion.