-
@node Search, Fixit, Display, Top
@chapter Searching and Replacement
@cindex searching
@kbd{C-g} as described below.@refill
When you are satisfied with the place you have reached, you can type
-@key{RET} (or @key{C-m}), which stops searching, leaving the cursor where
+@key{RET} (or @key{C-m}), which stops searching, leaving the cursor where
the search brought it. Any command not specially meaningful in searches also
stops the search and is then executed. Thus, typing @kbd{C-a} exits the
search and then moves to the beginning of the line. @key{RET} is necessary
The characters @kbd{M-p} and @kbd{M-n} can be used in an incremental
search to recall things which you have searched for in the past. A
-list of the last 16 things you have searched for is retained, and
+list of the last 16 things you have searched for is retained, and
@kbd{M-p} and @kbd{M-n} let you cycle through that ring.
-The character @kbd{M-@key{TAB}} does completion on the elements in
+The character @kbd{M-@key{TAB}} does completion on the elements in
the search history ring. For example, if you know that you have
recently searched for the string @code{POTATOE}, you could type
@kbd{C-s P O M-@key{TAB}}. If you had searched for other strings
beginning with @code{PO} then you would be shown a list of them, and
-would need to type more to select one.
+would need to type more to select one.
You can change any of the special characters in incremental search via
-the normal keybinding mechanism: simply add a binding to the
+the normal keybinding mechanism: simply add a binding to the
@code{isearch-mode-map}. For example, to make the character
@kbd{C-b} mean ``search backwards'' while in isearch-mode, do this:
@item C-w
Pull next word from buffer into search string (@code{isearch-yank-word}).
@item C-g
-Cancels input back to what has been found successfully, or aborts the
+Cancels input back to what has been found successfully, or aborts the
isearch (@code{isearch-abort}).
@item M-p
-Recall the previous element in the isearch history ring
+Recall the previous element in the isearch history ring
(@code{isearch-ring-retreat}).
@item M-n
-Recall the next element in the isearch history ring
+Recall the next element in the isearch history ring
(@code{isearch-ring-advance}).
@item M-@key{TAB}
-Do completion on the elements in the isearch history ring
+Do completion on the elements in the isearch history ring
(@code{isearch-complete}).
@end table
By default, @kbd{C-s} invokes incremental search, but if you give it an
empty argument, which would otherwise be useless, it invokes non-incremental
-search. Therefore, @kbd{C-s @key{RET}} invokes non-incremental search.
+search. Therefore, @kbd{C-s @key{RET}} invokes non-incremental search.
@kbd{C-r @key{RET}} also works this way.
@findex search-forward
@code{case-fold-search} to @code{nil}. Then all letters must match
exactly, including case. @code{case-fold-search} is a per-buffer
variable; altering it affects only the current buffer, but
-there is a default value which you can change as well. @xref{Locals}.
-You can also use @b{Case Sensitive Search} from the @b{Options} menu
+there is a default value which you can change as well. @xref{Locals}.
+You can also use @b{Case Sensitive Search} from the @b{Options} menu
on your screen.
@node Replace, Other Repeating Search, Search Case, Search
prompted for another input character. However, since the replacement has
already been made, @key{DEL} and @key{SPC} are equivalent. At this
point, you can type @kbd{C-r} (see below) to alter the replaced text. To
-undo the replacement, you can type @kbd{C-x u}.
+undo the replacement, you can type @kbd{C-x u}.
This exits the @code{query-replace}. If you want to do further
replacement you must use @kbd{C-x @key{ESC} @key{ESC}} to restart (@pxref{Repetition}).