Skip to content

Instantly share code, notes, and snippets.

View carimatics's full-sized avatar

carimatics carimatics

View GitHub Profile
@carimatics
carimatics / init.el
Last active June 7, 2016 04:56
pbcopy & pbpaste for Emacs
;;; Share the clipboard between OS X and Emacs
(defun copy-from-osx ()
(shell-command-to-string "pbpaste"))
(defun paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))