Skip to content

Instantly share code, notes, and snippets.

@edw
Created October 24, 2012 15:56
Show Gist options
  • Select an option

  • Save edw/3946915 to your computer and use it in GitHub Desktop.

Select an option

Save edw/3946915 to your computer and use it in GitHub Desktop.
Emacs OS X clipboard integration for console use.
(defun pbcopy (start end)
;; Useful for when you're doing 'emacs -nw' and you can't select
;; text in Terminal.app because you've split the terminal with
;; multiple buffers visible.
(interactive "rSend region to OS X pasteboard:")
(shell-command-on-region start end "pbcopy"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment