Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

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.


 
 
  Published under the terms of the GNU General Public License Design by Interspire