(Yet another) take on TUI Emacs copy/paste with your OS

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 :slight_smile:

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:

  • :white_check_mark: macOS: pbcopy / pbpaste
  • :white_check_mark: WSL: clip.exe, powershell.exe (I’d love some testers here, my VM wasn’t that much consistent).
  • :white_check_mark: Wayland: wl-copy, wl-paste
  • :white_check_mark: 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

1 Like