Open ralt opened 7 years ago
Could you elaborate on this? Emacs already has native support for X11 clipboard I suppose.
Yes, but you don't get undo history like Emacs' (C-y M-y
is beautiful), or you can't use Emacs' clipboard in X windows.
Some examples...
M-d
to delete the word, and C-y
won't put the clipboard from the X window. This clipboard is gone. C-y M-y
to yank the content of the X clipboard would be awesome.C-y M-y
into an X window. Not sure if that's feasible. (Speaking of, sorry, I thought copying in an emacs buffer wouldn't be able to yank into an X window, but it already works.)Cheers
save-interprogram-paste-before-kill
is right for your first example (it doesn't seem to handle unicode unfortunately).
As for the second one, implementing M-y is quite hard since we are unable to manipulate the content of another program. But you can make a command exploiting gui-select-text
to transfer certain text from the kill ring which you can then paste elsewhere.
I use a hacky way to do the job: 1. save "text" to kill-ring, 2. send paste key to app 3. clean kill-ring.
https://github.com/tumashu/exwm-x/blob/master/exwmx-sendstring.el
search for clipmon on melpa
Hi,
I think it's a pretty big feature, but it would definitely scratch an itch whenever you're copy pasting between X11 applications and Emacs buffers.
Integrating the X11 clipboard to yank into Emacs clipboard and vice versa would definitely be awesome.
Cheers