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.8 Scrolling During Incremental Search

Vertical scrolling during incremental search can be enabled by setting the customizable variable isearch-allow-scroll to a non-nil value.

You can then use the vertical scroll-bar or certain keyboard commands such as <PRIOR> (scroll-down), <NEXT> (scroll-up) and C-l (recenter) within the search, thus letting you see more of the text near the current match. You must run these commands via their key sequences to stay in the search—typing M-x command-name will always terminate a search.

You can give prefix arguments to these commands in the usual way. The current match cannot be scrolled out of the window—this is intentional.

Several other commands, such as C-x 2 (split-window-vertically) and C-x ^ (enlarge-window) which don't scroll the window, are nevertheless made available under this rubric, since they are likewise handy during a search.

You can make other commands usable within an incremental search by giving the command a non-nil isearch-scroll property. For example, to make C-h l usable within an incremental search in all future Emacs sessions, use C-h c to find what command it runs. (You type C-h c C-h l; it says view-lossage.) Then you can put the following line in your .emacs file (see Init File):

     (put 'view-lossage 'isearch-scroll t)

This works for commands that don't permanently change point, the buffer contents, the match data, the current buffer, or the selected window and frame. The command must not delete the current window and must not itself attempt an incremental search.


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