From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: set mark and point around current line
Date: Mon, 25 Jul 2005 11:46:53 -0600 [thread overview]
Message-ID: <dc38if$csd$1@sea.gmane.org> (raw)
In-Reply-To: <42e29218$1_1@news.iprimus.com.au>
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
prev parent reply other threads:[~2005-07-25 17:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-24 12:04 set mark and point around current line Baloff
2005-07-23 23:06 ` Zephyre
2005-07-24 3:43 ` Neon Absentius
2005-07-24 5:35 ` Tim X
2005-07-25 17:46 ` Kevin Rodgers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='dc38if$csd$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.