Repository navigation
Open
Description
Hi,
Can u give more instructions on how to bind key on macos?
Meanwhile, I got this error when invoke emacsclient --eval "(emacs-everywhere)" inside terminal.
Here is my emacs:
➜ ll /usr/local/bin/emacs
Permissions Size User Group Date Modified Name
lrwxr-xr-x 41 ztlevi admin 31 Jan 16:50 /usr/local/bin/emacs -> ../Cellar/emacs-plus@28/28.0.50/bin/emacs
SYSTEM type darwin
config x86_64-apple-darwin20.2.0
shell /usr/local/bin/zsh
uname Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
path (~/.config/emacs/bin/ ~/.local/share/fzf/bin /usr/local/opt/emacs-mac/bin ~/.config/emacs/bin ~/.local/share/cargo/bin ~/.local/share/nodenv/shims ~/.local/share/nodenv/bin ~/.local/share/nodenv/versions/14.15.4/bin /Library/Java/JavaVirtualMachines/openjdk-14.0.2.jdk/Contents/Home/bin ~/.local/share/android/bin ~/.local/share/go/bin /usr/local/sbin /usr/local/bin ~/.local/bin ~/Dotfiles/bin ~/.local/share/Dotfiles/base.macos.topic/bin ~/.local/share/Dotfiles/editor.emacs.topic/bin ~/.local/share/Dotfiles/misc.private.topic/bin ~/.local/share/Dotfiles/shell.git.topic/bin ~/.local/share/Dotfiles/shell.tmux.topic/bin /usr/bin /bin /usr/sbin /sbin /usr/local/anaconda3/bin ~/Library/Python/3.8/bin ~/.antigen/bundles/robbyrussell/oh-my-zsh/lib ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/github ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-extras ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gitignore ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gitfast ~/.antigen/bundles/wfxr/forgit ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker-compose ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/docker-machine ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/python ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/pip ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/django ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/golang ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/node ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/npm ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/yarn ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/zsh_reload ~/.antigen/bundles/jeffreytse/zsh-vi-mode ~/.antigen/bundles/hlissner/zsh-autopair ~/.antigen/bundles/zsh-users/zsh-completions ~/.antigen/bundles/zsh-users/zsh-history-substring-search ~/.antigen/bundles/zdharma/fast-syntax-highlighting ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux-cssh ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmuxinator ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/aws ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/fzf ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/jira ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/history ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/ripgrep ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/web-search ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/nmap ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/copydir ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/copyfile ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/common-aliases ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/command-not-found ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/colored-man-pages ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/rsync ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/dotenv ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/fd ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/mosh ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/extract ~/.antigen/bundles/soimort/you-get ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/brew ~/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/osx /usr/local/Cellar/emacs-plus@28/28.0.50/libexec/emacs/28.0.50/x86_64-apple-darwin20.2.0/)
EMACS dir ~/.config/emacs/
version 28.0.50
build Jan 27, 2021
buildopts --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained
features ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
traits (gui server-running envvar-file)
DOOM dir ~/.config/doom/
version 2.0.9
font #<font-spec nil nil CartographCF Nerd Font nil nil nil nil nil 13 nil nil nil nil>
theme doom-one-light
build HEAD -> develop d1e5bfc07 2021-01-31 18:57:23 -0500
elc-files 0
modules (:completion (company +auto) (ivy +icons +prescient +childframe) :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) treemacs vc-gutter vi-tilde-fringe window-select workspaces zen :editor (evil +everywhere) file-templates fold (format +onsave) lispy multiple-cursors rotate-text snippets :emacs (dired +ranger +icons) electric ibuffer undo vc :term eshell :checkers (syntax +childframe) (spell +aspell) grammar :tools (debugger +lsp) direnv docker editorconfig (eval +overlay) (lookup +devdocs +docsets) lsp magit make prodigy rgb tmux upload :os macos (tty +osc) :lang (cc +lsp) data emacs-lisp (go +lsp) json (java +lsp) (javascript +lsp) latex (markdown +grip) nix (org +roam +dragndrop ipython +pandoc +pomodoro +present) (python +pyright +lsp) rust sh web yaml :config (default +bindings +snippets +smartparens) :private (&user my-python) (&user my-checker))
packages ((adoc-mode) (tldr) (edit-indirect) (blog-admin :recipe (:host github :repo codefalling/blog-admin)) (youdao-dictionary) (link-hint) (symbol-overlay) (keycast) (all-the-icons-ibuffer) (emacs-everywhere :recipe (:host github :repo tecosaur/emacs-everywhere)) (dired-narrow) (atomic-chrome) (git-link) (counsel-etags) (imenu-list) (tmux-pane) (lsp-docker) (rime :recipe (:host github :repo DogLooksGood/emacs-rime :files (*.el Makefile lib.c))) (highlight-indent-guides) (bazel-mode :recipe (:host github :repo bazelbuild/emacs-bazel-mode)) (import-js))
unpin (n/a)
elpa (n/a)
Reacted by Gerry

Activity
tecosaur commentedon Feb 7, 2021
How recent is your version? Someone mentioned that issue to me, but I pushed a change that should have fixed it.
tecosaur commentedon Feb 7, 2021
With the mac keybinding, I'm afraid I don't really know how that would be done.
elken commentedon Feb 7, 2021
Something like karabiner
elken commentedon Feb 7, 2021
I can confirm the same issue, I'll see if I can fix for you
elken commentedon Feb 7, 2021
@ztlevi Try deleting your
~/.emacs.d/.local/straight/build-28.0.50/emacs-everywherefolder and doing adoom syncztlevi commentedon Feb 7, 2021
I'm on latest commit and I still have this issue @tecosaur
@elken How to bind a terminal command with karabiner?
elken commentedon Feb 7, 2021
It worked after updating my build folder, see previous comment.
https://karabiner-elements.pqrs.org/docs/
ztlevi commentedon Feb 7, 2021
@elken
I still have that osascript issue.
Something like this in karabiner?

elken commentedon Feb 7, 2021
@ztlevi what's in that folder now then?
tecosaur commentedon Feb 7, 2021
FYI: I don't actually have access to a Mac, so I'm going off guesswork 😛. The best hope is other Mac users like elken who can try to work out what's going on and test things themselves.
elken commentedon Feb 7, 2021
Aren't you always going off guesswork? 🤔
elken commentedon Feb 7, 2021
@ztlevi @tecosaur has a potential fix for you that should resolve this
ztlevi commentedon Feb 7, 2021
@tecosaur The title shows properly now. But it doesn't put the text in other apps. Let me know if you would like to do a live debugging session. You can reach me via Discord ztlevi#2108.
elken commentedon Feb 8, 2021
ztlevi commentedon Feb 8, 2021
@elken I recorded this https://vimeo.com/509692865.
And I
toggle-debug-on-errorbut nothing poped up.Versions:
18 remaining items
Keybinding documentation
Keybinding documentation reference issue #1
xqliu commentedon Mar 7, 2022
The alfred screenshot is great,
I can configure it correctly baed on it.
Thanks
tecosaur commentedon Mar 29, 2022
I'm wondering if it could be worth having a wiki for the different ways to get this side of things set up nicely.
elken commentedon Mar 29, 2022
Or just amend the README/add a setup.org
tecosaur commentedon Mar 29, 2022
The reason why I'm considering a wiki is because then anyone can just edit it.
tecosaur commentedon Apr 6, 2023
A wiki now exists, and is publicly editable: https://github.com/tecosaur/emacs-everywhere/wiki
XelorR commentedon Jun 16, 2023
Hello everyone.
I am trying to configure Emacs-Everywhere on my M1 mac. Emacs 28 (Homebrew default), MacOS Ventura.
I want to use Automator to setup quick action and keyboard settings to assign it.
My steps:




It works perfectly in my web browser but not in other apps. My keyboard shortcut doesn't work in Telegram and Microsoft Office apps for example.
What i did wrong? Do i need to assign any additional rights to Emacs or change the shortcut by some reason?
gary-ruizhang commentedon Jul 21, 2023
use absolute path for the emacsclient

aster-hu commentedon Jan 28, 2024
I use Hammerspoon to set keybinding
Cmd-Ctrl-eand below config works perfectly for me. I'm on Mac M2, Ventura 13 and Emacs 29.1 (railwaycat).For me, using
emacsclient --eval "(emacs-everywhere)alone did not work (it only works in Terminal) and I felt the most important thing is to set the right path foremacsclientbinary, which is inApplicationsfolder in my case. Also make sure you add Emacs and Hammerspoon in System Preference - Privacy & Security - Accessibility.Init.luadschaehi commentedon Sep 25, 2024
I was successful using Karabiner:
{ "description": "Emacs Everywhere with right_control + right_shift + e", "manipulators": [ { "from": { "key_code": "e", "modifiers": { "mandatory": ["right_control", "right_shift"] } }, "to": [{ "shell_command": "/opt/homebrew/bin/emacsclient --eval '(emacs-everywhere)'" }], "type": "basic" } ] }Before this key binding works, you would need to allow accessibility for Emacs. In my case, I had to remove Emacs from the list of applications in "System Settings -> Privacy & Security -> Accessibility" and then add it again.
nitincodery commentedon Sep 21, 2025
After using this PR #108, it worked on my mac (M1, 2020), I used following karabiner goku config to trigger it:
{:main [{:des "Cmd+` to Emacs Everywhere with Cmd+a first" :rules [[{:key :grave_accent_and_tilde :modi [:command]} [:!Ca "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -e \"(emacs-everywhere)\" >/dev/null 2>&1"]]]}]}Need to add
Cmd+a(select all shortcut) before runningemacs-everywhereto get all text input contents.tecosaur commentedon Sep 23, 2025
Thanks for sharing. I really should collect these configuration snippets in the readme at some point 😅
DamienCassou commentedon Oct 1, 2025
what about using the wiki so everyone can help?
Bounga commentedon Nov 1, 2026
I got this working with Apple's built-in Shortcuts app on macOS, using Doom Emacs but it should work on vanilla Emacs with just one-line change.
Create a shortcut with a Run Shell Script action (Bash, no input variable, administrator privileges off):
Adapt the path / command (
/opt/homebrew/bin/emacsclient --eval '(emacs-everywhere)'for example) . The socket expression assumes the default socket directory and server name. Setting it explicitly fixed a lookup failure I encountered when launching from Shortcuts.I wrote up the setup with screenshots and troubleshooting, including an obsolete AppleScript format error. Related PR.
Hope it helps.