I wrote a small snippet that enables clipboard integration in terminal Emacs using just native system tools (system tools, not emacs 3rd party packages), (mainly for my emacs-solo config), this means OF COURSE you should use xclip.el
or clipetty
instead, this is hacky
If not for anything else, read if you’re curious on learning a bit on emacs lisp and some internals, check it out, it supports:
macOS:
pbcopy
/pbpaste
WSL:
clip.exe
,powershell.exe
(I’d love some testers here, my VM wasn’t that much consistent).Wayland:
wl-copy
,wl-paste
X11:
xclip
It wires into interprogram-cut-function
and interprogram-paste-function
.
Would love feedback or to hear about other lightweight clipboard setups you use!
Link to post: Minimal Clipboard Support in Terminal Emacs | Rahul's Blog