© Harley Hahn 2016

Harley Hahn, Harley Hahn's Emacs Field Guide, 10.1007/978-1-4842-1703-0_10

10. Searching

Harley Hahn

(1)Santa Barbara, California, USA

10.1 Section 10.1: Introducing the Emacs Search Commands

Emacs gives you several ways to search for a pattern within the buffer. Figure 10-1 shows a summary of the different search commands. At first, it looks overwhelming, but don’t worry. In almost all cases, it boils down to four simple ideas.

  1. To search forward, press C-s and type what you want to find.

  2. To search backward, press C-r and type what you want to find.

    To remember the names, think of s for "search" and r for "reverse". As you are searching, the characters you type are called the SEARCH STRING.

  3. If Emacs finds what you specified, you can ...

Get Harley Hahn's Emacs Field Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.