Open ztlevi opened 3 years ago
How recent is your version? Someone mentioned that issue to me, but I pushed a change that should have fixed it.
With the mac keybinding, I'm afraid I don't really know how that would be done.
With the mac keybinding, I'm afraid I don't really know how that would be done.
Something like karabiner
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)
I can confirm the same issue, I'll see if I can fix for you
@ztlevi Try deleting your ~/.emacs.d/.local/straight/build-28.0.50/emacs-everywhere
folder and doing a doom sync
I'm on latest commit and I still have this issue @tecosaur
emacs-everywhere on master
➜ g glog
* a484800 - (grafted, HEAD -> master, origin/master, origin/HEAD) Add demo, note soon to be doom module (
emacs-everywhere on master took 7s
➜ pwd
/Users/ztlevi/.config/emacs/.local/straight/repos/emacs-everywhere
@elken How to bind a terminal command with karabiner?
It worked after updating my build folder, see previous comment.
@elken How to bind a terminal command with karabiner?
@elken I still have that osascript issue.
Something like this in karabiner?
@ztlevi what's in that folder now then?
FYI: I don't actually have access to a Mac, so I'm going off guesswork :stuck_out_tongue:. The best hope is other Mac users like elken who can try to work out what's going on and test things themselves.
FYI: I don't actually have access to a Mac, so I'm going off guesswork stuck_out_tongue. The best hope is other Mac users like elken who can try to work out what's going on and test things themselves.
Aren't you always going off guesswork? :thinking:
@ztlevi @tecosaur has a potential fix for you that should resolve this
@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.
Make sure you're running the latest commits, I have proven it works as have a few others on the doom discord.
On 7 Feb 2021, 23:14, at 23:14, Ting Zhou notifications@github.com wrote:
@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.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/tecosaur/emacs-everywhere/issues/1#issuecomment-774786164
@elken I recorded this https://vimeo.com/509692865.
And I toggle-debug-on-error
but nothing poped up.
Versions:
emacs-everywhere on master
✖ pwd
/Users/ztlevi/.config/emacs/.local/straight/repos/emacs-everywhere
emacs-everywhere on master
➜ g glog
* d84b397 - (grafted, HEAD -> master) Fix: Pasting on OSX (15 hours ago) <Ellis Kenyo>
@elken @tecosaur I recorded the video using emacs-plus 28. I tried emacs-mac 27 and it works for a few times then it broke up again like the video I recorded.
It's able to dump the text I put in emacs, but is it possible to copy the entire text in other apps to Emacs Everywhere buffer?
Thanks for the video.
Your behaviour seems fairly strange. Frankly, I have no idea what's going on. What could be helpful is working out what at stage things break. The three steps performed on exit are:
With copying the text, on Linux I run a command to get the current text selection. Perhaps there's an osascript
equivalent? I'll have to wait for someone else to PR this though.
I was using 27 but I can try with 28 tonight and debug the behaviour
Just installed emacs-plus@28 fresh and everything works as intended. Outside of telling you to reinstall it I don't think there's much to be done.
@elken Which macos version are you using? I'm on big sur.
11.2
Another option to define a hotkey is Hammerspoon. In your ~/.hammerspoon/init.lua
, you can use something like this:
hyper = {"cmd","alt","ctrl"}
hs.hotkey.bindSpec({hyper, "e"},
function ()
hs.task.new("/bin/bash", nil, { "-l", "-c", "emacsclient --eval '(emacs-everywhere)'" }):start()
end
)
In Alfred it could be a workflow, triggered by a hotkey
that calls a Run Script
action.
@ztlevi could you try this https://github.com/tecosaur/emacs-everywhere/pull/20#issuecomment-815429503, It might be a privacy/permission issue.
BTW, In this issue we talked a bit about how to use this on MacOS, without relying on external tools via @xukai92
I'm using the built-in app Automator to create a Service to run doom everywhere (whatever the command you use to trigger emacs-everywhere) and register a shorcut using macOS's built-in settings at System Preferences > Keyboard > Shortcuts > Services.
there is more detail in the linked issue
@d1egoaz I tried adding accessibility to /bin/bash and /bin/zsh but no luck :( Thanks for the help though...
@ztlevi could you also try taking a look at https://github.com/tecosaur/emacs-everywhere/pull/11#issuecomment-789400299 ? It may help.
I'd love it if at some point it could be worked out exactly what's needed to make this work on MacOS completely and consistently, and someone PR a well-documented process.
I only have emacs and alacritty in security&privacy
->accessibility
and same as my automation section.
I'm not using Terminal. Maybe that's the reason?
I only have emacs and alacritty in
security&privacy
->accessibility
and same as my automation section.I'm not using Terminal. Maybe that's the reason?
🤔I'm also using Alacritty.
but for me, I needed to allow bash
in Automation, it didn't matter if it was terminal/alacritty
I was able to get an Alfred workflow working as @d1egoaz outlines here: https://github.com/tecosaur/emacs-everywhere/issues/1#issuecomment-815109676
I did have to change one thing from his screenshots which might be helpful to note for others running into issues. Both /bin/bash
and /bin/zsh
are run non-interactively when used in an Alfred workflow like this, so there's a good chance your shell config files aren't loaded and thus the emacsclient
binary isn't available on $PATH
. You can resolve this by calling the binary with its full path location, i.e.:
/usr/local/bin/emacsclient --eval "(emacs-everywhere)"
With the mac keybinding, I'm afraid I don't really know how that would be done.
Even just an explanation in the README about how you do it in your environment would be a good starting example. This way people understand how it should work. Then others could write sections for their own OS.
The alfred screenshot is great,
I can configure it correctly baed on it.
Thanks
I'm wondering if it could be worth having a wiki for the different ways to get this side of things set up nicely.
I'm wondering if it could be worth having a wiki for the different ways to get this side of things set up nicely.
Or just amend the README/add a setup.org
The reason why I'm considering a wiki is because then anyone can just edit it.
A wiki now exists, and is publicly editable: https://github.com/tecosaur/emacs-everywhere/wiki
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?
@elken I still have that osascript issue.
Something like this in karabiner?
use absolute path for the emacsclient
I use Hammerspoon to set keybinding Cmd-Ctrl-e
and 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 for emacsclient
binary, which is in Applications
folder in my case. Also make sure you add Emacs and Hammerspoon in System Preference - Privacy & Security - Accessibility.
Init.lua
cms = {"cmd", "ctrl"}
hs.hotkey.bindSpec({cms, "e"},
function()
hs.execute("/Applications/Emacs.app/Contents/MacOS/bin/emacsclient --eval '(emacs-everywhere)'")
end)
I was successful using Karabiner:
{
"description": "Emacs Everywhere with right_control + right_shift + escape",
"manipulators": [
{
"from": {
"key_code": "e",
"modifiers": { "mandatory": ["right_control", "right_shift"] }
},
"to": [{ "shell_command": "/opt/homebrew/bin/emacsclient --eval '(emacs-everywhere)'" }],
"type": "basic"
}
]
}
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: