reddit / emacs

M-x outside of emacs?

trae · 2022-10-22 16:30
I'm really missing M-x functionality outside of emacs for tasks that I do frequently enough that I assigned them a global shortcut, but infrequently enough that I forget it! On MacOS, I use Hammerspoon, and I assigned a shortcut to it's console and then promptly forgot it. Would love to hit `M-x Hammerspoon-console` anywhere and have it brought up. Wondering if there's anything like that already available? There's built-in spotlight, and [alfredapp](https://www.alfredapp.com) but I would prefer to leverage emacs further.
graduale · 2022-10-22 16:37
I’m not sure what your mean by “leverage emacs further”. Are you thinking of using emacs to call Hammespoon, say, by typing “M-x” from anywhere?
blahgeek · 2022-10-22 16:56
I believe you can do that with exwm. But it’s only for Linux
xenodium · 2022-10-22 17:20
These may help https://xenodium.com/emacs-utilities-for-your-os
KaranasToll · 2022-10-22 19:31
Since you're on mac, isn't cmd+space basically what you want
SenorSmalls · 2022-10-22 20:50
Quicksilver might allow you to send commands to emacsclient. I think there’s a plug-in to run she’ll commands
JDRiverRun · 2022-10-23 02:36
>Would love to hit M-x Hammerspoon-console anywhere and have it brought up. Anywhere in emacs? The Hammerspoon cli command is useful: (defun hammerspoon-console () (interactive) (async-shell-command "hs -c 'hs.toggleConsole()'"))
trae · 2022-10-23 03:17
It occurred to me that I already know how to do this: bind a global shortcut to `emacsclient -ce '(execute-extended-command nil)'`. Then I can build any workflow I desire including what you're suggesting. Thanks!
mickeyp · 2022-10-23 15:06
Not a 100% what you are looking for, but if you want some tips on how to bridge the shell-Emacs gap, have a look at this: https://www.masteringemacs.org/article/fuzzy-finding-emacs-instead-of-fzf