Remoting, emacs, and copy-pasting

Discussion of programming Lisps using Emacs, including SLIME and other tools

Remoting, emacs, and copy-pasting

Postby audwinc » Mon Sep 06, 2010 1:44 pm

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?
audwinc
 
Posts: 12
Joined: Thu Sep 02, 2010 11:46 am

Re: Remoting, emacs, and copy-pasting

Postby Ramarren » Mon Sep 06, 2010 2:06 pm

The xclip program should be useful here, if by "give it access to X" you mean the clipboard.
Ramarren
 
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland

Re: Remoting, emacs, and copy-pasting

Postby audwinc » Mon Sep 06, 2010 4:56 pm

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
audwinc
 
Posts: 12
Joined: Thu Sep 02, 2010 11:46 am


Return to Emacs

Who is online

Users browsing this forum: No registered users and 4 guests