Page 1 of 1

Remoting, emacs, and copy-pasting

PostPosted: Mon Sep 06, 2010 1:44 pm
by audwinc
Is there a solution that gives the best of all worlds for copying text from emacs on a remote server and pasting it to other apps on my local machine?

Here is what I am trying to do. On my local machine, I ssh to a remote server with -X -Y. The remote xcalc shows its pretty graphics. "emacs" shows up graphically, but it is super slow. "emacs -nw" runs very quickly and is nice to edit in, but emacs now does not know anything about X, so I cannot copy text to the X clipboard.

I want to run emacs in the console mode but still give it access to X. How do I do this?

Re: Remoting, emacs, and copy-pasting

PostPosted: Mon Sep 06, 2010 2:06 pm
by Ramarren
The xclip program should be useful here, if by "give it access to X" you mean the clipboard.

Re: Remoting, emacs, and copy-pasting

PostPosted: Mon Sep 06, 2010 4:56 pm
by audwinc
Thank you! I did some further research and found this helper module: http://www.emacswiki.org/emacs-en/xclip.el

I was able to get it to work locally and remotely with -nw and without by installing xclip and then adding this to my .emacs file:

Code: Select all
(require 'xclip)
(turn-on-xclip)  ; the detection hook is not that slick, so this forces the issue