help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search for a word in Emacs as is done in gvim


From: David Combs
Subject: Re: Search for a word in Emacs as is done in gvim
Date: Sun, 3 May 2009 01:07:16 +0000 (UTC)

In article <mailman.5543.1239997324.31690.help-gnu-emacs@gnu.org>,
Tassilo Horn  <tassilo@member.fsf.org> wrote:
>rakeshg <rakeshbabugr@gmail.com> writes:
>
>> By having the cursor on a particular word, and pressing "*" key , we
>> can search for the word in the files.
>>
>> In emacs we have first copy the word and then do Ctl-S and then paste
>> it.
>
>No, do `M-b C-s C-w' and be fine.  (M-b goes to the beginning of the
>word, C-s starts isearch and C-w captures the word from point to end and
>inserts it at the isearch prompt.


WOW!  IT WORKS!  That C-w deposits the word into the search string!

Now, just WHERE  is that documented?

| C-w runs the command kill-region
|   which is an interactive compiled Lisp function in `simple.el'.
| It is bound to <S-delete>, C-w.
| (kill-region beg end &optional yank-handler)
| 
| Kill ("cut") text between point and mark.
| This deletes the text from the buffer and saves it in the kill ring.
| The command C-y can retrieve it from there.
| (If you want to kill and then yank immediately, use M-w.)
| 
| If you want to append the killed region to the last killed text,
| use C-M-w before C-w.
| 
| If the buffer is read-only, Emacs will beep and refrain from deleting
| the text, but put the text in the kill ring anyway.  This means that
| you can use the killing commands to copy text from a read-only buffer.
| 
| This is the primitive for programs to kill text (as opposed to deleting it).
| Supply two arguments, character positions indicating the stretch of text
|  to be killed.
| Any command that calls this function is a "kill command".
| If the previous command was also a kill command,
| the text killed this time appends to the text killed last time
| to make one entry in the kill ring.
| 
| In Lisp code, optional third arg yank-handler, if non-nil,
| specifies the yank-handler text property to be set on the killed
| text.  See `insert-for-yank'.

[back]


Thanks (for the nifty trick!)


David

PS: If that doc needs fixing, I'll leave it to you to see
that it happens -- and THANK YOU for that too.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]