emacs-everywhere
emacs-everywhere copied to clipboard
Does not work in i3wm
I use i3wm and have installed the extension and bind it to the keyboard shortcut.
When I activate the keyboard sequence I get the window.
Then I write something and press C-c C-c.
The window disappears but the content is not pasted in the textarea.
Here is the Messages extract:
Saving file /tmp/emacs-everywhere-20220516-225637-Emacs... Wrote /tmp/emacs-everywhere-20220516-225637-Emacs command-execute: Buffer is read-only: #<buffer Messages>
Thank you very much for your help.
I have the same or a similar problem. The text is not pasted, or the paste is garbled or from an older instance.
For example, when using Emacs Everywhere from this text box, I get an error "Primary selection is empty".
The solution might be set primary too in emacs-everywhere-copy-command.
https://unix.stackexchange.com/questions/69111/how-to-target-multiple-selections-with-xclip
The clipboard is currently set with (gui-select-text (buffer-string)). The docstring of gui-select-text suggests that if select-enable-primary is non-nil the primary selection will be affected. @dschrempf @QiangF if this helps, please let me know.
@arael when paste does not happen automatically, that's usually because focus in the specific text input was lost. I'm not sure what we can really do about this.
@tecosaur I have tried with in Gnome/Xorg session and it does work. I also noticed that the content gets fetched properly if I first select it with the mouse, which would place it in the primary selection buffer. But if I do not select the text then it does not work. Anyway, even by having to select the text manually, this extension is still useful because it spares me the effort of launching an instance of emacsclient and the pasting. I think I will play with xdotool a bit to make it work with i3.
Thank you very much for the pointer. That was indeed the issue.
Should I close this issue?
@arael
Hi,
Can you share with me on how you managed to use it with i3wm?
Thanks
@whatacold
I don't use it anymore. But if I remember correctly it was bound to a shortcut, like every other emacs binding I have:
bindsym $mod-e exec emacsclient -c -e '(emacs-everywhere)'
The extensions works if you select and copy the text first.
@arael
Thank you, I will try it.
Well, it didn't work due to the bug in https://github.com/tecosaur/emacs-everywhere/pull/62. With the patch, it worked.
Here is my little config for i3wm:
bindsym $mod+w exec –no-startup-id emacsclient –eval '(emacs-everywhere)'
for_window [title="Emacs Everywhere"] floating enable
Cheers!
I've pushed e1b701894196b0e0aaf18ab88c778877ec87d0c9 in the hope it might help with this.