aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2003-11-01 17:06:00 +0000
committerEli Zaretskii2003-11-01 17:06:00 +0000
commita57bfc9f97269cfbfccee38cb7d26af4aeed9531 (patch)
tree73640925cb1674773f73781bbc5082a02c3f54e8
parent6904b34bf4f4383484de65974df78a403867a1b8 (diff)
downloademacs-a57bfc9f97269cfbfccee38cb7d26af4aeed9531.tar.gz
emacs-a57bfc9f97269cfbfccee38cb7d26af4aeed9531.zip
(Scrolling During Incremental Search): Document a
new scrolling facility in isearch mode.
-rw-r--r--man/search.texi132
1 files changed, 118 insertions, 14 deletions
diff --git a/man/search.texi b/man/search.texi
index 7e7c1c43723..657edc71f1a 100644
--- a/man/search.texi
+++ b/man/search.texi
@@ -19,14 +19,15 @@ more flexible replacement command called @code{query-replace}, which
19asks interactively which occurrences to replace. 19asks interactively which occurrences to replace.
20 20
21@menu 21@menu
22* Incremental Search:: Search happens as you type the string. 22* Incremental Search:: Search happens as you type the string.
23* Nonincremental Search:: Specify entire string and then search. 23* Nonincremental Search:: Specify entire string and then search.
24* Word Search:: Search for sequence of words. 24* Word Search:: Search for sequence of words.
25* Regexp Search:: Search for match for a regexp. 25* Regexp Search:: Search for match for a regexp.
26* Regexps:: Syntax of regular expressions. 26* Regexps:: Syntax of regular expressions.
27* Search Case:: To ignore case while searching, or not. 27* Search Case:: To ignore case while searching, or not.
28* Replace:: Search, and replace some or all matches. 28* Configuring Scrolling:: Scrolling within incremental search.
29* Other Repeating Search:: Operating on all matches for some regexp. 29* Replace:: Search, and replace some or all matches.
30* Other Repeating Search:: Operating on all matches for some regexp.
30@end menu 31@end menu
31 32
32@node Incremental Search, Nonincremental Search, Search, Search 33@node Incremental Search, Nonincremental Search, Search, Search
@@ -226,6 +227,34 @@ alter their bindings in the keymap @code{isearch-mode-map}. For a list
226of bindings, look at the documentation of @code{isearch-mode} with 227of bindings, look at the documentation of @code{isearch-mode} with
227@kbd{C-h f isearch-mode @key{RET}}. 228@kbd{C-h f isearch-mode @key{RET}}.
228 229
230@subsection Scrolling During Incremental Search
231
232 Vertical scrolling during incremental search can be enabled by
233setting the customizable variable @code{isearch-allow-scroll} to a
234non-nil value.
235
236 You can then use the vertical scroll-bar or certain keyboard
237commands such as @kbd{@key{PRIOR}} (@code{scroll-down}),
238@kbd{@key{NEXT}} (@code{scroll-up}) and @kbd{C-l} (@code{recenter})
239within the search, thus letting you see more of the text near the
240current match. You must run these commands via their key sequences to
241stay in the search - typing M-x @var{comand-name} will always
242terminate a search.
243
244 You can give prefix arguments to these commands in the usual way.
245The current match cannot be scrolled out of the window - this is
246intentional.
247
248 Several other commands, such as @kbd{C-x 2}
249(@code{split-window-vertically}) and @kbd{C-x ^}
250(@code{enlarge-window}) which don't scroll the window, are
251nevertheless made available under this rubric, since they are likewise
252handy during a search.
253
254 For a list of commands which are configured as scrolling commands by
255default and instructions on how thus to configure other commands, see
256@ref{Configuring Scrolling}.
257
229@subsection Slow Terminal Incremental Search 258@subsection Slow Terminal Incremental Search
230 259
231 Incremental search on a slow terminal uses a modified style of display 260 Incremental search on a slow terminal uses a modified style of display
@@ -762,7 +791,7 @@ colors, Emacs blinks the cursor around the matched text, as it does
762for matching parens.) 791for matching parens.)
763@end ignore 792@end ignore
764 793
765@node Search Case, Replace, Regexps, Search 794@node Search Case, Configuring Scrolling, Regexps, Search
766@section Searching and Case 795@section Searching and Case
767 796
768 Incremental searches in Emacs normally ignore the case of the text 797 Incremental searches in Emacs normally ignore the case of the text
@@ -792,7 +821,82 @@ This variable applies to nonincremental searches also, including those
792performed by the replace commands (@pxref{Replace}) and the minibuffer 821performed by the replace commands (@pxref{Replace}) and the minibuffer
793history matching commands (@pxref{Minibuffer History}). 822history matching commands (@pxref{Minibuffer History}).
794 823
795@node Replace, Other Repeating Search, Search Case, Search 824@node Configuring Scrolling, Replace, Search Case, Search
825@section Configuring Scrolling
826@cindex scrolling in incremental search
827@vindex isearch-allow-scroll
828
829Scrolling, etc., during incremental search is enabled by setting the
830customizable variable @code{isearch-allow-scroll} to a non-nil value.
831
832@c See Subject: Info file: How do I get an itemized list without blank lines?
833@c Date: Sat, 12 Apr 2003 09:45:31 +0000 in gnu.emacs.help
834@subsection Standard scrolling commands
835Here is the list of commands which are configured by default to be
836``scrolling'' commands in an incremental search, together with their
837usual bindings:
838@subsubsection Commands which scroll the window:
839@table @asis
840@item @code{scroll-bar-toolkit-scroll} (@kbd{@key{vertical-scroll-bar}@key{mouse-1}} in X-Windows)
841@itemx @code{mac-handle-scroll-bar-event} (@kbd{@key{vertical-scroll-bar}@key{mouse-1}} on a Mac)
842@itemx @code{w32-handle-scroll-bar-event} (@kbd{@key{vertical-scroll-bar}@key{mouse-1}} in MS-Windows)
843@item @code{recenter} (@kbd{C-l}) @xref{Scrolling}.
844@itemx @code{reposition-window} (@kbd{C-M-l}) @xref{Scrolling}.
845@itemx @code{scroll-up} (@kbd{@key{NEXT}}) @xref{Scrolling}.
846@itemx @code{scroll-down} (@kbd{@key{PRIOR}}) @xref{Scrolling}.
847@end table
848
849@subsubsection Commands which act on the other window:
850@table @asis
851@item @code{list-buffers} (@kbd{C-x C-b}) @xref{List Buffers}.
852@itemx @code{scroll-other-window} (@kbd{C-M-v}) @xref{Other Window}.
853@itemx @code{scroll-other-window-down} (@kbd{C-M-S-v}) @xref{Other Window}.
854@itemx @code{beginning-of-buffer-other-window} (@kbd{M-@key{home}})
855@itemx @code{end-of-buffer-other-window} (@kbd{M-@key{end}})
856@end table
857
858@subsubsection Commands which change the window layout:
859@table @asis
860@item @code{delete-other-windows} (@kbd{C-x 1}) @xref{Change Window}.
861@itemx @code{balance-windows} (@kbd{C-x +}) @xref{Change Window}.
862@itemx @code{split-window-vertically} (@kbd{C-x 2}) @xref{Split Window}.
863@itemx @code{enlarge-window} (@kbd{C-x ^}) @xref{Change Window}.
864@end table
865
866@subsection Configuring other commands as scrolling commands
867To do this, set a command's isearch-scroll property to the value t.
868For example:
869
870@example
871@code{(put 'my-command 'isearch-scroll t)}
872@end example
873
874You should only thus configure commands which are ``safe'': i.e., they
875won't leave emacs in an inconsistent state when executed within a
876search - that is to say, the following things may be changed by a
877command only temporarily, and must be restored before the command
878finishes:
879
880@enumerate
881@item
882Point.
883@item
884The buffer contents.
885@item
886The selected window and selected frame.
887@item
888The current match-data @xref{Match Data,,,elisp}.
889@end enumerate
890
891Additionally, the command must not delete the current window and must
892not itself attempt an incremental search. It may, however, change the
893window's size, or create or delete other windows and frames.
894
895Note that an attempt by a command to scroll the text
896@emph{horizontally} won't work, although it will do no harm - any such
897scrolling will be overriden and nullified by the display code.
898
899@node Replace, Other Repeating Search, Configuring Scrolling, Search
796@section Replacement Commands 900@section Replacement Commands
797@cindex replacement 901@cindex replacement
798@cindex search-and-replace commands 902@cindex search-and-replace commands
@@ -814,10 +918,10 @@ parallel using the command @code{expand-region-abbrevs}
814(@pxref{Expanding Abbrevs}). 918(@pxref{Expanding Abbrevs}).
815 919
816@menu 920@menu
817* Unconditional Replace:: Replacing all matches for a string. 921* Unconditional Replace:: Replacing all matches for a string.
818* Regexp Replace:: Replacing all matches for a regexp. 922* Regexp Replace:: Replacing all matches for a regexp.
819* Replacement and Case:: How replacements preserve case of letters. 923* Replacement and Case:: How replacements preserve case of letters.
820* Query Replace:: How to use querying. 924* Query Replace:: How to use querying.
821@end menu 925@end menu
822 926
823@node Unconditional Replace, Regexp Replace, Replace, Replace 927@node Unconditional Replace, Regexp Replace, Replace, Replace