20.1.1 Basics of Incremental Search
C-s starts a forward incremental search. It reads characters
from the keyboard, and moves point past the next occurrence of those
characters. If you type C-s and then F, that puts the
cursor after the first ‘F’ (the first following the starting point, since
this is a forward search). Then if you type an O, you will see
the cursor move just after the first ‘FO’ (the ‘F’ in that
‘FO’ may or may not be the first ‘F’). After another
O, the cursor moves after the first ‘FOO’ after the place
where you started the search. At each step, the buffer text that
matches the search string is highlighted, if the terminal can do that;
the current search string is always displayed in the echo area.
If you make a mistake in typing the search string, you can cancel
characters with <DEL>. Each <DEL> cancels the last character of
search string. This does not happen until Emacs is ready to read another
input character; first it must either find, or fail to find, the character
you want to erase. If you do not want to wait for this to happen, use
C-g as described below.
When you are satisfied with the place you have reached, you can type
<RET>, which stops searching, leaving the cursor where the search
brought it. Also, any command not specially meaningful in searches
stops the searching and is then executed. Thus, typing C-a
would exit the search and then move to the beginning of the line.
<RET> is necessary only if the next command you want to type is a
printing character, <DEL>, <RET>, or another character that is
special within searches (C-q, C-w, C-r, C-s,
C-y, M-y, M-r, M-c, M-e, and some other
meta-characters).
When you exit the incremental search, it sets the mark where point
was before the search. That is convenient for moving back
there. In Transient Mark mode, incremental search sets the mark
without activating it, and does so only if the mark is not already
active.