In emacs, examine
clipboard-kill-region
clipboard-kill-ring-save
clipboard-yank
I wrote this to copy a whole buffer to the clipboard:
(defun copy-all ()
"copy buffer to clipboard"
(interactive)
(clipboard-kill-ring-save (point-min) (point-max))
(message "Copy done.") )
Also, I've made a useful alias called xc, like this: xclip -selection clipboard
. Then, echo $(pwd) | xc
(for example) will send your directory tree position to the clipboard.
And, by accident, I noticed I can paste into urxvt by pushing the mousewheel button. I don't like using the mouse at all, so if you know how to bind this to a keyboard shortcut, please tell me.
Edit: I found (somewhere on this site) that the answer to the final (my) question is - it is already done, namely Shift-Insert.
X
? If not and they are usingssh
they don't have a clipboard. – Ulrich Dangel Jul 28 '12 at 22:25