In emacs, examine
I wrote this to copy a whole buffer to the clipboard:
(defun copy-all ()
"copy buffer to clipboard"
(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.