From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: set mark and point around current line Date: Mon, 25 Jul 2005 11:46:53 -0600 Message-ID: References: <42e29218$1_1@news.iprimus.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1122314572 16471 80.91.229.2 (25 Jul 2005 18:02:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Jul 2005 18:02:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 25 20:02:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dx7HJ-0008Pv-Gx for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jul 2005 20:02:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dx7Jb-00036h-UV for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jul 2005 14:04:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dx7H7-0001mp-SB for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 14:02:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dx7FN-0000x4-IW for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 14:00:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dx7FH-0000lA-AC for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 14:00:09 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dx7E1-0004vw-CT for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 13:58:49 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Dx72w-0006P2-B6 for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 19:47:22 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jul 2005 19:47:22 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jul 2005 19:47:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <42e29218$1_1@news.iprimus.com.au> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28170 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28170 Baloff wrote: > how can I find out what is the command to do somthing. M-x apropos RET do-something RET > say I want to select "highlight" the current line to copy it to > another window. I tried `M-x apropos RET current-line' and didn't find anything that does the job. > do I (Set the mark and point around the current line) > M-w > change > window > C-y? Yes. Of course setting the mark and moving point changes the point, which you may not want, and involves a 3-key sequence: C-a C-@ C-e. So you might want to define a keyboard macro, e.g. (global-set-key "\C-cl" "\C-a\C-@\C-e\M-w") or bind a key to a new command: (defun copy-current-line-as-kill () "Save the current line as if killed, but don't kill it. See `copy-region-as-kill'." (interactive) (kill-ring-save (point-at-bol) (point-at-eol))) (global-set-key "\C-cl" 'copy-current-line-as-kill) > and btw, when you have many windows open, aren't they numbered so that > you can issue a command to go to a spacific window instead of what I am > doing C-x o and watch the pointer move randomly till it gets to the > window of my choice. You can give a prefix arg to other-window (which is what `C-x o' is bound to), e.g. `C-u 3 C-x o' or `M-3 C-x o'. -- Kevin Rodgers