From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: floyd@barrow.com (Floyd L. Davidson) Newsgroups: gmane.emacs.help Subject: Re: Copy and Pasting in Emacs... Date: Sun, 07 Mar 2004 19:36:46 -0900 Organization: __________ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87y8qceyzl.fld@barrow.com> References: <94740f05.0403071520.5069e469@posting.google.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1078991116 11604 80.91.224.253 (11 Mar 2004 07:45:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Mar 2004 07:45:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 11 08:45:09 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B1KsO-000727-00 for ; Thu, 11 Mar 2004 08:45:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1KZz-0008WJ-6W for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Mar 2004 02:26:07 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!HSNX.atgi.net!falcon.america.net!eagle.america.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.0 Cancel-Lock: sha1:M13ccTEdhCaIwdiLftwpMxg0k/Y= Original-Lines: 99 Original-NNTP-Posting-Host: 209.124.156.38 Original-X-Trace: eagle.america.net 1078720663 209.124.156.38 (Sun, 07 Mar 2004 23:37:43 EST) Original-NNTP-Posting-Date: Sun, 07 Mar 2004 23:37:43 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:121524 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17517 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17517 googleaddress@yahoo.co.uk (Patrick) wrote: >i have just started to use emacs and unixy things..so apologies if >this seems a little simple\naive > >I am currently using XEmacs on windows One problem for the un-initiated is the ability to re-bind keys to just about anything the user likes. Hence it's hard to say just what a specific set of key sequences will do once you have anyone fooling with the configuration. A second factor is that different terminals, and different kinds of connections between the terminal and the host, cause hugely varying results for certain key sequences. For example, I doubt that a CTRL+SPACEBAR works on many forms of remote connection to a host, yet works fine when using the builtin system console. You can go through your list of commands, one at a time, on your Windows system, and determine the exact _functions_ being used to accomplish your task. Then on a remote system you can query emacs about key bindings to learn which key sequences (if any) can be used on that system. C-h k key-sequence will tell you what the function name is. Then, on the remote, M-x describe-bindings will give you a list of all key bindings. A quick search will provide one (or more!) binding for any given function, or show you that it can only be executed by name if there are no bindings. You then want to try the alternate bindings for things which seem not to travel well over your network connection. For example, here are the key sequences that I would use to do what you describe: >To copy a line in emacs i >(a)put the cursor at the beginning of the line M-a beginning-of-line >(b)press CTRL+SPACEBAR M-space set-mark-command >(c)put the cursor at the end of the line M-e end-of-line >(d)press ALT+W (where ALT = metakey) M-w kill-ring-save There are other ways to do it too. M-x beginning-of-line M-x mark-end-of-line M-x kill-ring-save The mark-end-of-line function is probably not bound to a key sequence. >now the line is copied... > >and to paste the copied line... > >(e)press CTRL-Y Just for fun... copy several things into the kill ring from different places in a buffer, then use C-y to yank back the last one. They try M-y to replace it with the previous one, continue using M-y to eventually get to the first region that was copied. >Now I have recently needed to use emacs on a remote machine (running >under linux). >I ssh into the machine from my computer (running windows) using ssh >from cygwin. >I open up emacs on this remote machine. >But the steps (a) to (e) above will not work, i cannot copy a line. > >Anyone have any ideas where im going wrong? Im sure its pretty >trivial, ive searched the net but to no avail. Probably the C-space key sequence is not available via a remote connection. The trick you need is to find *all* such oddities, and then come up with init files which make your two different systems act the same way. (As easy as that may sound... it isn't.) -- Floyd L. Davidson Ukpeagvik (Barrow, Alaska) floyd@barrow.com