Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Magic commands to copy/paste from remote machine
Browse files Browse the repository at this point in the history
See corresponding changes in bradleywright/dotfiles
  • Loading branch information
bradwright committed Dec 3, 2012
1 parent 4c10c96 commit bd02626
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion init-linux.el
@@ -1,5 +1,18 @@
;;; Linux stuff
(when *is-linux*
(progn))
(progn

;; remote copy/paste from host OS X machine
(defun copy-from-remote ()
(shell-command-to-string "~/bin/rpbpaste"))

(defun paste-to-remote (text &optional push)
"Copies the top of the kill ring stack to the OSX clipboard"
(let ((process-connection-type nil))
(let ((proc (start-process "rpbcopy" "*Messages*" "~/bin/rpbcopy")))
(process-send-string proc text)
(process-send-eof proc))))
(setq interprogram-paste-function 'copy-from-remote)
(setq interprogram-cut-function 'paste-to-remote)))

(provide 'init-linux)

0 comments on commit bd02626

Please sign in to comment.