* Copying till end of word or line
@ 2009-08-25 20:13 Farhan Ahmed
2009-08-26 2:47 ` Eric Abrahamsen
2009-08-26 7:52 ` Peter Dyballa
0 siblings, 2 replies; 5+ messages in thread
From: Farhan Ahmed @ 2009-08-25 20:13 UTC (permalink / raw)
To: help-gnu-emacs
Is there a single command that will let me copy the word under the cursor
into my yank buffer? Also, how about till the end of the line?
I know I can use C-spc and movement commands to achieve the same but a
single command might be useful.
Farhan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Copying till end of word or line
2009-08-25 20:13 Copying till end of word or line Farhan Ahmed
@ 2009-08-26 2:47 ` Eric Abrahamsen
2009-08-26 7:52 ` Peter Dyballa
1 sibling, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2009-08-26 2:47 UTC (permalink / raw)
To: help-gnu-emacs
On Aug 26, 2009, at 4:13 AM, Farhan Ahmed wrote:
> Is there a single command that will let me copy the word under the
> cursor
> into my yank buffer? Also, how about till the end of the line?
I don't know of a single command that can do that, but often just
doing a kill and a yank right away (replacing the text you yanked) is
the easiest way to get something into the kill ring, if you can get
over the appearance of having "deleted" text you actually want. Also,
check out M-@ to mark words going forward, that's a nice one I
discovered recently.
E
>
> I know I can use C-spc and movement commands to achieve the same but a
> single command might be useful.
>
> Farhan
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Copying till end of word or line
2009-08-25 20:13 Copying till end of word or line Farhan Ahmed
2009-08-26 2:47 ` Eric Abrahamsen
@ 2009-08-26 7:52 ` Peter Dyballa
1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-08-26 7:52 UTC (permalink / raw)
To: Farhan Ahmed; +Cc: help-gnu-emacs
Am 25.08.2009 um 22:13 schrieb Farhan Ahmed:
> Is there a single command that will let me copy the word under the
> cursor
> into my yank buffer?
Double-click.
> Also, how about till the end of the line?
A macro (kill to end of line, undo this action), bound to Shift-
double-click?
--
Greetings
Pete
Eternity is a terrible thought. I mean, where's it going to end?
- Tom Stoppard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Copying till end of word or line
[not found] <mailman.5361.1251240327.2239.help-gnu-emacs@gnu.org>
@ 2009-08-26 10:54 ` Pascal J. Bourguignon
2009-08-27 19:26 ` Suvayu Ali
0 siblings, 1 reply; 5+ messages in thread
From: Pascal J. Bourguignon @ 2009-08-26 10:54 UTC (permalink / raw)
To: help-gnu-emacs
"Farhan Ahmed" <farhan@alienfluid.com> writes:
> Is there a single command that will let me copy the word under the cursor
> into my yank buffer? Also, how about till the end of the line?
I don't know, but let's see.
What is the command used to copy the region?
I don't know, but let's see.
How do we find the command executed when I type something?
C-h k something
What do I type to copy something?
C-w
How do we find the command executed when I type C-w?
C-h k C-w
What is the name of the command used to copy the region?
kill-region
What other commands exist that start by kill-?
We can use M-x apropos-command or completion upon entry of a command
to see them. Let's kill two rabits with one stone by using the latest
option, on C-h f which will give us the help of the selected command:
C-h f kill- TAB
Do I see anything I like?
Yes, there's kill-line, kill-whole-line, kill-word, etc...
Is there a shortcut for kill-word?
I don't know, but let's see. Type word RET to complete and get the
help.
Does the help mention any binding for the kill-word command?
Yes, there's M-d. Happy!
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Copying till end of word or line
2009-08-26 10:54 ` Pascal J. Bourguignon
@ 2009-08-27 19:26 ` Suvayu Ali
0 siblings, 0 replies; 5+ messages in thread
From: Suvayu Ali @ 2009-08-27 19:26 UTC (permalink / raw)
To: help-gnu-emacs
Pascal J. Bourguignon wrote:
> "Farhan Ahmed" <farhan@alienfluid.com> writes:
>> Is there a single command that will let me copy the word under the cursor
>> into my yank buffer? Also, how about till the end of the line?
>
<...snip...>
>
> Does the help mention any binding for the kill-word command?
>
> Yes, there's M-d. Happy!
>
I did learn a lot of ways to search there,:) but I think what the OP was
asking was different. He wanted to copy not kill the next word.
Something like what `M-w' does for a region.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-27 19:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 20:13 Copying till end of word or line Farhan Ahmed
2009-08-26 2:47 ` Eric Abrahamsen
2009-08-26 7:52 ` Peter Dyballa
[not found] <mailman.5361.1251240327.2239.help-gnu-emacs@gnu.org>
2009-08-26 10:54 ` Pascal J. Bourguignon
2009-08-27 19:26 ` Suvayu Ali
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).