To get access to the actual Emacs kill ring, I don't know, but if you find out, please tell us, and I'd be very appreciative. But there are some other things I know of that might help you.
It is not true that you can't access the X clipboard in the Linux VT/tty/console.
Check out those aliases, as they are shown when I use
where in zsh:
xi: aliased to xclip -d ":0" -selection clipboard
xo: aliased to xclip -d ":0" -selection clipboard -o
I also put the
xo part into a script (called
pst), so as to paste from X to Emacs.
CLIP=`xclip -d ":0" -o -selection clipboard`
CLIP_LEN=`echo -n $CLIP | wc -c`
echo "(set-variable '*clip-len* $CLIP_LEN)" > ~/.clip_len
echo -n $CLIP
Then, in Emacs:
(setq *clip-len* 0)
(defun pst ()
"Inserts the X clipboard (xclip -d ':0' -o -selection clipboard)
at point. `M-1' (the '(1)) to insert in the current buffer."
(shell-command "/home/user_name/scripts/pst" '(1))
(forward-char *clip-len*) )
Now, to get Emacs-Emacs communication (and I agree several instances is not optimal), if they share access to a file, how about using it by setting up functions like:
(defun write-to-file-clipboard ()
"Write the region to `~/.fclipboard.txt'"
(write-region (region-beginning) (region-end) "~/.fclipboard.txt") )
Then, do a similar for
insert-file, etc., and then setup shortcuts and/or (Emacs) aliases for fast access.
This is of course not the Emacs kill ring but at least I found them very useful as a "next best" thing.