ch11ng / exwm

Emacs X Window Manager
2.85k stars 136 forks source link

Feature request: integration of the X11 clipboard into Emacs clipboard #296

Open ralt opened 7 years ago

ralt commented 7 years ago

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

ch11ng commented 7 years ago

Could you elaborate on this? Emacs already has native support for X11 clipboard I suppose.

ralt commented 7 years ago

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.

ralt commented 7 years ago

Some examples...

Cheers

ch11ng commented 7 years ago

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.

tumashu commented 7 years ago

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

voobscout commented 6 years ago

search for clipmon on melpa