all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Search selected text
@ 2006-06-22  7:55 nico
  2006-06-22  8:00 ` David Kastrup
  0 siblings, 1 reply; 3+ messages in thread
From: nico @ 2006-06-22  7:55 UTC (permalink / raw)


Hi all,

sorry if it seems obvious but i really can t find (help or web) :/
is it possible to search the selected text in (x)emacs ?
thanx in advance 

nicolas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Search selected text
  2006-06-22  7:55 Search selected text nico
@ 2006-06-22  8:00 ` David Kastrup
  2006-06-22  8:28   ` nico
  0 siblings, 1 reply; 3+ messages in thread
From: David Kastrup @ 2006-06-22  8:00 UTC (permalink / raw)


"nico" <memoclic@gmail.com> writes:

> Hi all,
>
> sorry if it seems obvious but i really can t find (help or web) :/
> is it possible to search the selected text in (x)emacs ?
> thanx in advance 

Various ways.

C-s runs the command isearch-forward
   which is an interactive compiled Lisp function in `isearch.el'.
It is bound to C-s.
(isearch-forward &optional REGEXP-P NO-RECURSIVE-EDIT)

Do incremental search forward.
With a prefix argument, do an incremental regular expression search instead.

As you type characters, they add to the search string and are found.
The following non-printing keys are bound in `isearch-mode-map'.

Type DEL to cancel last input item from end of search string.
Type RET to exit, leaving point at location found.
Type LFD (C-j) to match end of line.
Type C-s to search again forward, C-r to search again backward.
Type C-w to yank next word or character in buffer
  onto the end of the search string, and search for it.
Type C-M-w to delete character from end of search string.
Type C-M-y to yank char from buffer onto end of search string and search for it.
Type C-y to yank rest of line onto end of search string and search for it.
Type M-y to yank last killed text onto end of search string and search for it.
Type C-q to quote control character to search for it.
C-g while searching or when search has failed cancels input back to what has
 been found successfully.
C-g when search is successful aborts and moves point to starting point.

If you try to exit with the search string still empty, it invokes
 nonincremental search.

Type M-% to start `query-replace' with string to replace from last search string.
Type C-M-% to start `query-replace-regexp' with string to replace from last search string.

Type M-c to toggle search case-sensitivity.
Type M-r to toggle regular-expression mode.
Type M-e to edit the search string in the minibuffer.

Also supported is a search ring of the previous 16 search strings.
Type M-n to search for the next item in the search ring.
Type M-p to search for the previous item in the search ring.
Type M-TAB to complete the search string using the search ring.

If an input method is turned on in the current buffer, that input
method is also active while you are typing characters to search.  To
toggle the input method, type C-\.  It
also toggles the input method in the current buffer.

To use a different input method for searching, type
C-^, and specify an input method
you want to use.

The above keys, bound in `isearch-mode-map', are often controlled by
 options; do M-x apropos on search-.* to find them.
Other control and meta characters terminate the search
 and are then executed normally (depending on `search-exit-option').
Likewise for function keys and mouse button events.

If this function is called non-interactively, it does not return to
the calling function until the search is done.

[back]


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Search selected text
  2006-06-22  8:00 ` David Kastrup
@ 2006-06-22  8:28   ` nico
  0 siblings, 0 replies; 3+ messages in thread
From: nico @ 2006-06-22  8:28 UTC (permalink / raw)


yeah!
cursor at the beginning of the word,
C-s C-w C-s
works great

I will practice some of your other shortuts tonight :)

thanx david


David Kastrup a écrit :

> "nico" <memoclic@gmail.com> writes:
>
> > Hi all,
> >
> > sorry if it seems obvious but i really can t find (help or web) :/
> > is it possible to search the selected text in (x)emacs ?
> > thanx in advance
>
> Various ways.
>
> C-s runs the command isearch-forward
>    which is an interactive compiled Lisp function in `isearch.el'.
> It is bound to C-s.
> (isearch-forward &optional REGEXP-P NO-RECURSIVE-EDIT)
>
> Do incremental search forward.
> With a prefix argument, do an incremental regular expression search instead.
>
> As you type characters, they add to the search string and are found.
> The following non-printing keys are bound in `isearch-mode-map'.
>
> Type DEL to cancel last input item from end of search string.
> Type RET to exit, leaving point at location found.
> Type LFD (C-j) to match end of line.
> Type C-s to search again forward, C-r to search again backward.
> Type C-w to yank next word or character in buffer
>   onto the end of the search string, and search for it.
> Type C-M-w to delete character from end of search string.
> Type C-M-y to yank char from buffer onto end of search string and search for it.
> Type C-y to yank rest of line onto end of search string and search for it.
> Type M-y to yank last killed text onto end of search string and search for it.
> Type C-q to quote control character to search for it.
> C-g while searching or when search has failed cancels input back to what has
>  been found successfully.
> C-g when search is successful aborts and moves point to starting point.
>
> If you try to exit with the search string still empty, it invokes
>  nonincremental search.
>
> Type M-% to start `query-replace' with string to replace from last search string.
> Type C-M-% to start `query-replace-regexp' with string to replace from last search string.
>
> Type M-c to toggle search case-sensitivity.
> Type M-r to toggle regular-expression mode.
> Type M-e to edit the search string in the minibuffer.
>
> Also supported is a search ring of the previous 16 search strings.
> Type M-n to search for the next item in the search ring.
> Type M-p to search for the previous item in the search ring.
> Type M-TAB to complete the search string using the search ring.
>
> If an input method is turned on in the current buffer, that input
> method is also active while you are typing characters to search.  To
> toggle the input method, type C-\.  It
> also toggles the input method in the current buffer.
>
> To use a different input method for searching, type
> C-^, and specify an input method
> you want to use.
>
> The above keys, bound in `isearch-mode-map', are often controlled by
>  options; do M-x apropos on search-.* to find them.
> Other control and meta characters terminate the search
>  and are then executed normally (depending on `search-exit-option').
> Likewise for function keys and mouse button events.
>
> If this function is called non-interactively, it does not return to
> the calling function until the search is done.
> 
> [back]
> 
> 
> -- 
> David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-22  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22  7:55 Search selected text nico
2006-06-22  8:00 ` David Kastrup
2006-06-22  8:28   ` nico

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.