diff options
| author | Chong Yidong | 2011-10-19 00:21:52 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-10-19 00:21:52 -0400 |
| commit | 5abc31ef1857bf04852e4a0f4c599cd7460f4faa (patch) | |
| tree | 6092681c422d9446c3b95c0af32587ddc77c4552 | |
| parent | 939db9ac789cadf11693fd7362aa6da65930be5b (diff) | |
| download | emacs-5abc31ef1857bf04852e4a0f4c599cd7460f4faa.tar.gz emacs-5abc31ef1857bf04852e4a0f4c599cd7460f4faa.zip | |
Update Search chapter in Emacs manual.
* doc/emacs/search.texi (Repeat Isearch, Error in Isearch): Add kindex entries.
(Isearch Yank): Document isearch-yank-pop.
(Isearch Scroll): Refer to C-l instead of unbound `recenter'.
(Other Repeating Search): Document Occur Edit mode.
| -rw-r--r-- | admin/FOR-RELEASE | 2 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 184 | ||||
| -rw-r--r-- | etc/NEWS | 3 |
4 files changed, 109 insertions, 88 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index df559785c2b..7b1b7df7704 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -191,7 +191,7 @@ programs.texi | |||
| 191 | regs.texi cyd | 191 | regs.texi cyd |
| 192 | rmail.texi | 192 | rmail.texi |
| 193 | screen.texi cyd | 193 | screen.texi cyd |
| 194 | search.texi | 194 | search.texi cyd |
| 195 | sending.texi | 195 | sending.texi |
| 196 | text.texi | 196 | text.texi |
| 197 | trouble.texi | 197 | trouble.texi |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 6e93e7a259e..63afcd228ad 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-10-19 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * search.texi (Repeat Isearch, Error in Isearch): Add kindex | ||
| 4 | entries. | ||
| 5 | (Isearch Yank): Document isearch-yank-pop. | ||
| 6 | (Isearch Scroll): Refer to C-l instead of unbound `recenter'. | ||
| 7 | (Other Repeating Search): Document Occur Edit mode. | ||
| 8 | |||
| 1 | 2011-10-18 Chong Yidong <cyd@gnu.org> | 9 | 2011-10-18 Chong Yidong <cyd@gnu.org> |
| 2 | 10 | ||
| 3 | * display.texi (Fringes): Move overflow-newline-into-fringe here, | 11 | * display.texi (Fringes): Move overflow-newline-into-fringe here, |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 7290de1caab..8e77de0bbb4 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -166,23 +166,27 @@ going past the original starting point of the search, it changes to | |||
| 166 | you have already seen. | 166 | you have already seen. |
| 167 | 167 | ||
| 168 | @cindex search ring | 168 | @cindex search ring |
| 169 | @kindex M-n @r{(Incremental search)} | ||
| 170 | @kindex M-p @r{(Incremental search)} | ||
| 169 | To reuse earlier search strings, use the @dfn{search ring}. The | 171 | To reuse earlier search strings, use the @dfn{search ring}. The |
| 170 | commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a | 172 | commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a |
| 171 | search string to reuse. These commands leave the selected search ring | 173 | search string to reuse. These commands leave the selected search ring |
| 172 | element in the minibuffer, where you can edit it. To edit the current | 174 | element in the minibuffer, where you can edit it. |
| 173 | search string in the minibuffer without replacing it with items from | 175 | |
| 174 | the search ring, type @kbd{M-e}. Type @kbd{C-s} or @kbd{C-r} to | 176 | @kindex M-e @r{(Incremental search)} |
| 175 | terminate editing the string and search for it. | 177 | To edit the current search string in the minibuffer without |
| 178 | replacing it with items from the search ring, type @kbd{M-e}. Type | ||
| 179 | @kbd{C-s} or @kbd{C-r} to finish editing the string and search for it. | ||
| 176 | 180 | ||
| 177 | @node Error in Isearch | 181 | @node Error in Isearch |
| 178 | @subsection Errors in Incremental Search | 182 | @subsection Errors in Incremental Search |
| 179 | 183 | ||
| 180 | If your string is not found at all, the echo area says @samp{Failing | 184 | If your string is not found at all, the echo area says @samp{Failing |
| 181 | I-Search}. The cursor is after the place where Emacs found as much of | 185 | I-Search}, and the cursor moves past the place where Emacs found as |
| 182 | your string as it could. Thus, if you search for @samp{FOOT}, and | 186 | much of your string as it could. Thus, if you search for @samp{FOOT}, |
| 183 | there is no @samp{FOOT}, you might see the cursor after the @samp{FOO} | 187 | and there is no @samp{FOOT}, you might see the cursor after the |
| 184 | in @samp{FOOL}. In the echo area, the part of the search string that | 188 | @samp{FOO} in @samp{FOOL}. In the echo area, the part of the search |
| 185 | failed to match is highlighted using the customizable face | 189 | string that failed to match is highlighted using the face |
| 186 | @code{isearch-fail}. | 190 | @code{isearch-fail}. |
| 187 | 191 | ||
| 188 | At this point, there are several things you can do. If your string | 192 | At this point, there are several things you can do. If your string |
| @@ -195,6 +199,7 @@ search string the characters that could not be found (the @samp{T} in | |||
| 195 | entirely, returning point to where it was when the search started. | 199 | entirely, returning point to where it was when the search started. |
| 196 | 200 | ||
| 197 | @cindex quitting (in search) | 201 | @cindex quitting (in search) |
| 202 | @kindex C-g @r{(Incremental search)} | ||
| 198 | The quit command, @kbd{C-g}, does special things during searches; | 203 | The quit command, @kbd{C-g}, does special things during searches; |
| 199 | just what it does depends on the status of the search. If the search | 204 | just what it does depends on the status of the search. If the search |
| 200 | has found what you specified and is waiting for input, @kbd{C-g} | 205 | has found what you specified and is waiting for input, @kbd{C-g} |
| @@ -270,62 +275,70 @@ keybindings. These keybindings are part of the keymap | |||
| 270 | @node Isearch Yank | 275 | @node Isearch Yank |
| 271 | @subsection Isearch Yanking | 276 | @subsection Isearch Yanking |
| 272 | 277 | ||
| 278 | @kindex C-y @r{(Incremental search)} | ||
| 279 | @kindex M-y @r{(Incremental search)} | ||
| 280 | @findex isearch-yank-kill | ||
| 281 | @findex isearch-yank-pop | ||
| 273 | Within incremental search, @kbd{C-y} (@code{isearch-yank-kill}) | 282 | Within incremental search, @kbd{C-y} (@code{isearch-yank-kill}) |
| 274 | copies text from the kill ring into the search string. It uses the | 283 | appends the current kill to the search string. @kbd{M-y} |
| 275 | same text that @kbd{C-y}, outside of incremental search, would | 284 | (@code{isearch-yank-pop}), if called after @kbd{C-y}, replaces that |
| 276 | normally yank into the buffer. @kbd{Mouse-2} in the echo area does | 285 | appended text with an earlier kill, similar to the usual @kbd{M-y} |
| 277 | the same. @xref{Yanking}. | 286 | (@code{yank-pop}) command (@pxref{Yanking}). @kbd{Mouse-2} appends |
| 278 | 287 | the current X selection (@pxref{Primary Selection}). | |
| 279 | @kbd{C-w} (@code{isearch-yank-word-or-char}) grabs the next | 288 | |
| 280 | character or word at point, and adds it to the search string. This is | 289 | @kindex C-w @r{(Incremental search)} |
| 281 | convenient for searching for another occurrence of the text at point. | 290 | @findex isearch-yank-word-or-char |
| 282 | (The decision, whether to copy a character or a word, is heuristic.) | 291 | @kbd{C-w} (@code{isearch-yank-word-or-char}) appends the next |
| 283 | 292 | character or word at point to the search string. This is an easy way | |
| 284 | Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) grabs the rest | 293 | to search for another occurrence of the text at point. (The decision |
| 285 | of the current line, and adds it to the search string. If point is | 294 | of whether to copy a character or a word is heuristic.) |
| 286 | already at the end of a line, it grabs the entire next line. | 295 | |
| 296 | @kindex M-s C-e @r{(Incremental search)} | ||
| 297 | @findex isearch-yank-line | ||
| 298 | Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) appends the rest | ||
| 299 | of the current line to the search string. If point is already at the | ||
| 300 | end of a line, it appends the next line. | ||
| 287 | 301 | ||
| 288 | If the search is currently case-insensitive, both @kbd{C-w} and | 302 | If the search is currently case-insensitive, both @kbd{C-w} and |
| 289 | @kbd{M-s C-e} convert the text they copy to lower case, so that the | 303 | @kbd{M-s C-e} convert the text they copy to lower case, so that the |
| 290 | search remains case-insensitive. | 304 | search remains case-insensitive. |
| 291 | 305 | ||
| 292 | @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one | 306 | @kindex C-M-w @r{(Incremental search)} |
| 293 | character at a time: @kbd{C-M-w} deletes the last character from the | 307 | @kindex C-M-y @r{(Incremental search)} |
| 294 | search string and @kbd{C-M-y} copies the character after point to the | 308 | @findex isearch-del-char |
| 295 | end of the search string. An alternative method to add the character | 309 | @findex isearch-yank-char |
| 296 | after point into the search string is to enter the minibuffer by | 310 | @kbd{C-M-w} (@code{isearch-del-char}) deletes the last character |
| 297 | @kbd{M-e} and to type @kbd{C-f} at the end of the search string in the | 311 | from the search string, and @kbd{C-M-y} (@code{isearch-yank-char}) |
| 298 | minibuffer. | 312 | appends the character after point to the the search string. An |
| 313 | alternative method to add the character after point is to enter the | ||
| 314 | minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f} | ||
| 315 | at the end of the search string in the minibuffer. | ||
| 299 | 316 | ||
| 300 | @node Isearch Scroll | 317 | @node Isearch Scroll |
| 301 | @subsection Scrolling During Incremental Search | 318 | @subsection Scrolling During Incremental Search |
| 302 | 319 | ||
| 303 | @vindex isearch-allow-scroll | 320 | @vindex isearch-allow-scroll |
| 304 | You can enable the use of vertical scrolling during incremental | 321 | Normally, scrolling commands exit incremental search. If you change |
| 305 | search (without exiting the search) by setting the customizable | 322 | the variable @code{isearch-allow-scroll} to a non-@code{nil} value, |
| 306 | variable @code{isearch-allow-scroll} to a non-@code{nil} value. This | 323 | that enables the use of the scroll-bar, as well as keyboard scrolling |
| 307 | applies to using the vertical scroll-bar and to certain keyboard | 324 | commands like @kbd{C-v}, @kbd{M-v}, and @kbd{C-l} (@pxref{Scrolling}). |
| 308 | commands such as @code{scroll-down-command}, @code{scroll-up-command} | 325 | This applies only to calling these commands via their bound key |
| 309 | and @code{recenter} (@pxref{Scrolling}). You must run these commands | 326 | sequences---typing @kbd{M-x} will still exit the search. You can give |
| 310 | via their key sequences to stay in the search---typing @kbd{M-x} will | 327 | prefix arguments to these commands in the usual way. This feature |
| 311 | terminate the search. You can give prefix arguments to these commands | 328 | won't let you scroll the current match out of visibility, however. |
| 312 | in the usual way. | 329 | |
| 313 | 330 | The @code{isearch-allow-scroll} feature also affects some other | |
| 314 | This feature won't let you scroll the current match out of visibility, | 331 | commands, such as @kbd{C-x 2} (@code{split-window-vertically}) and |
| 315 | however. | 332 | @kbd{C-x ^} (@code{enlarge-window}), which don't exactly scroll but do |
| 316 | 333 | affect where the text appears on the screen. It applies to any | |
| 317 | The feature also affects some other commands, such as @kbd{C-x 2} | 334 | command whose name has a non-@code{nil} @code{isearch-scroll} |
| 318 | (@code{split-window-vertically}) and @kbd{C-x ^} | 335 | property. So you can control which commands are affected by changing |
| 319 | (@code{enlarge-window}) which don't exactly scroll but do affect where | 336 | these properties. |
| 320 | the text appears on the screen. In general, it applies to any command | ||
| 321 | whose name has a non-@code{nil} @code{isearch-scroll} property. So you | ||
| 322 | can control which commands are affected by changing these properties. | ||
| 323 | 337 | ||
| 324 | For example, to make @kbd{C-h l} usable within an incremental search | 338 | For example, to make @kbd{C-h l} usable within an incremental search |
| 325 | in all future Emacs sessions, use @kbd{C-h c} to find what command it | 339 | in all future Emacs sessions, use @kbd{C-h c} to find what command it |
| 326 | runs. (You type @kbd{C-h c C-h l}; it says @code{view-lossage}.) | 340 | runs (@pxref{Key Help}), which is @code{view-lossage}. Then you can |
| 327 | Then you can put the following line in your @file{.emacs} file | 341 | put the following line in your init file (@pxref{Init File}): |
| 328 | (@pxref{Init File}): | ||
| 329 | 342 | ||
| 330 | @example | 343 | @example |
| 331 | (put 'view-lossage 'isearch-scroll t) | 344 | (put 'view-lossage 'isearch-scroll t) |
| @@ -380,18 +393,14 @@ This enters the minibuffer to read the search string; terminate the | |||
| 380 | string with @key{RET}, and then the search takes place. If the string | 393 | string with @key{RET}, and then the search takes place. If the string |
| 381 | is not found, the search command signals an error. | 394 | is not found, the search command signals an error. |
| 382 | 395 | ||
| 383 | When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental | ||
| 384 | search as usual. That command is specially programmed to invoke | ||
| 385 | nonincremental search, @code{search-forward}, if the string you | ||
| 386 | specify is empty. (Such an empty argument would otherwise be | ||
| 387 | useless.) @kbd{C-r @key{RET}} does likewise, for a reverse | ||
| 388 | incremental search. | ||
| 389 | |||
| 390 | @findex search-forward | 396 | @findex search-forward |
| 391 | @findex search-backward | 397 | @findex search-backward |
| 392 | Forward and backward nonincremental searches are implemented by the | 398 | When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental |
| 393 | commands @code{search-forward} and @code{search-backward}. These | 399 | search as usual. That command is specially programmed to invoke the |
| 394 | commands may be bound to other keys in the usual manner. | 400 | command for nonincremental search, @code{search-forward}, if the |
| 401 | string you specify is empty. (Such an empty argument would otherwise | ||
| 402 | be useless.) @kbd{C-r @key{RET}} does likewise, invoking the command | ||
| 403 | @code{search-backward}. | ||
| 395 | 404 | ||
| 396 | @node Word Search | 405 | @node Word Search |
| 397 | @section Word Search | 406 | @section Word Search |
| @@ -451,7 +460,7 @@ apply to the lazy highlight, which always matches whole words. | |||
| 451 | that denotes a class of alternative strings to match. GNU Emacs | 460 | that denotes a class of alternative strings to match. GNU Emacs |
| 452 | provides both incremental and nonincremental ways to search for a | 461 | provides both incremental and nonincremental ways to search for a |
| 453 | match for a regexp. The syntax of regular expressions is explained in | 462 | match for a regexp. The syntax of regular expressions is explained in |
| 454 | the following section. | 463 | the next section. |
| 455 | 464 | ||
| 456 | @table @kbd | 465 | @table @kbd |
| 457 | @item C-M-s | 466 | @item C-M-s |
| @@ -506,7 +515,7 @@ starting position. These search methods are not mirror images. | |||
| 506 | 515 | ||
| 507 | @findex re-search-forward | 516 | @findex re-search-forward |
| 508 | @findex re-search-backward | 517 | @findex re-search-backward |
| 509 | Nonincremental search for a regexp is done by the functions | 518 | Nonincremental search for a regexp is done with the commands |
| 510 | @code{re-search-forward} and @code{re-search-backward}. You can | 519 | @code{re-search-forward} and @code{re-search-backward}. You can |
| 511 | invoke these with @kbd{M-x}, or by way of incremental regexp search | 520 | invoke these with @kbd{M-x}, or by way of incremental regexp search |
| 512 | with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}. | 521 | with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}. |
| @@ -916,9 +925,9 @@ close-brackets, quotes, or parentheses, repeated zero or more times. | |||
| 916 | Searches in Emacs normally ignore the case of the text they are | 925 | Searches in Emacs normally ignore the case of the text they are |
| 917 | searching through, if you specify the text in lower case. Thus, if | 926 | searching through, if you specify the text in lower case. Thus, if |
| 918 | you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo} | 927 | you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo} |
| 919 | are also considered a match. Regexps, and in particular character | 928 | also match. Regexps, and in particular character sets, behave |
| 920 | sets, are included: @samp{[ab]} would match @samp{a} or @samp{A} or | 929 | likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b} or |
| 921 | @samp{b} or @samp{B}.@refill | 930 | @samp{B}.@refill |
| 922 | 931 | ||
| 923 | An upper-case letter anywhere in the incremental search string makes | 932 | An upper-case letter anywhere in the incremental search string makes |
| 924 | the search case-sensitive. Thus, searching for @samp{Foo} does not find | 933 | the search case-sensitive. Thus, searching for @samp{Foo} does not find |
| @@ -960,8 +969,8 @@ command, there is @kbd{M-%} (@code{query-replace}), which presents | |||
| 960 | each occurrence of the pattern and asks you whether to replace it. | 969 | each occurrence of the pattern and asks you whether to replace it. |
| 961 | 970 | ||
| 962 | The replace commands normally operate on the text from point to the | 971 | The replace commands normally operate on the text from point to the |
| 963 | end of the buffer. When the mark is active, they operate on the | 972 | end of the buffer. When the region is active, they operate on it |
| 964 | region instead (@pxref{Mark}). The basic replace commands replace one | 973 | instead (@pxref{Mark}). The basic replace commands replace one |
| 965 | @dfn{search string} (or regexp) with one @dfn{replacement string}. It | 974 | @dfn{search string} (or regexp) with one @dfn{replacement string}. It |
| 966 | is possible to perform several replacements in parallel, using the | 975 | is possible to perform several replacements in parallel, using the |
| 967 | command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). | 976 | command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). |
| @@ -998,7 +1007,7 @@ activating the mark; use @kbd{C-u C-@key{SPC}} to move back there. | |||
| 998 | @xref{Mark Ring}. | 1007 | @xref{Mark Ring}. |
| 999 | 1008 | ||
| 1000 | A prefix argument restricts replacement to matches that are | 1009 | A prefix argument restricts replacement to matches that are |
| 1001 | surrounded by word boundaries. The argument's value doesn't matter. | 1010 | surrounded by word boundaries. |
| 1002 | 1011 | ||
| 1003 | @xref{Replacement and Case}, for details about case-sensitivity in | 1012 | @xref{Replacement and Case}, for details about case-sensitivity in |
| 1004 | replace commands. | 1013 | replace commands. |
| @@ -1128,10 +1137,8 @@ replacement is done without case conversion. | |||
| 1128 | 1137 | ||
| 1129 | @table @kbd | 1138 | @table @kbd |
| 1130 | @item M-% @var{string} @key{RET} @var{newstring} @key{RET} | 1139 | @item M-% @var{string} @key{RET} @var{newstring} @key{RET} |
| 1131 | @itemx M-x query-replace @key{RET} @var{string} @key{RET} @var{newstring} @key{RET} | ||
| 1132 | Replace some occurrences of @var{string} with @var{newstring}. | 1140 | Replace some occurrences of @var{string} with @var{newstring}. |
| 1133 | @item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET} | 1141 | @item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET} |
| 1134 | @itemx M-x query-replace-regexp @key{RET} @var{regexp} @key{RET} @var{newstring} @key{RET} | ||
| 1135 | Replace some matches for @var{regexp} with @var{newstring}. | 1142 | Replace some matches for @var{regexp} with @var{newstring}. |
| 1136 | @end table | 1143 | @end table |
| 1137 | 1144 | ||
| @@ -1144,7 +1151,7 @@ occurrence and asks you whether to replace it. Aside from querying, | |||
| 1144 | @code{query-replace} works just like @code{replace-string} | 1151 | @code{query-replace} works just like @code{replace-string} |
| 1145 | (@pxref{Unconditional Replace}). In particular, it preserves case | 1152 | (@pxref{Unconditional Replace}). In particular, it preserves case |
| 1146 | provided @code{case-replace} is non-@code{nil}, as it normally is | 1153 | provided @code{case-replace} is non-@code{nil}, as it normally is |
| 1147 | (@pxref{Replacement and Case}). A numeric argument means consider | 1154 | (@pxref{Replacement and Case}). A numeric argument means to consider |
| 1148 | only occurrences that are bounded by word-delimiter characters. | 1155 | only occurrences that are bounded by word-delimiter characters. |
| 1149 | 1156 | ||
| 1150 | @kindex C-M-% | 1157 | @kindex C-M-% |
| @@ -1157,7 +1164,7 @@ like @code{query-replace}. | |||
| 1157 | These commands highlight the current match using the face | 1164 | These commands highlight the current match using the face |
| 1158 | @code{query-replace}. They highlight other matches using | 1165 | @code{query-replace}. They highlight other matches using |
| 1159 | @code{lazy-highlight} just like incremental search (@pxref{Incremental | 1166 | @code{lazy-highlight} just like incremental search (@pxref{Incremental |
| 1160 | Search}). By default, @code{query-replace-regexp} will show | 1167 | Search}). By default, @code{query-replace-regexp} will show the |
| 1161 | substituted replacement string for the current match in the | 1168 | substituted replacement string for the current match in the |
| 1162 | minibuffer. If you want to keep special sequences @samp{\&} and | 1169 | minibuffer. If you want to keep special sequences @samp{\&} and |
| 1163 | @samp{\@var{n}} unexpanded, customize | 1170 | @samp{\@var{n}} unexpanded, customize |
| @@ -1290,6 +1297,8 @@ matching that regexp. | |||
| 1290 | This command is just like @code{multi-isearch-buffers}, except it | 1297 | This command is just like @code{multi-isearch-buffers}, except it |
| 1291 | performs an incremental regexp search. | 1298 | performs an incremental regexp search. |
| 1292 | 1299 | ||
| 1300 | @cindex Occur mode | ||
| 1301 | @cindex mode, Occur | ||
| 1293 | @item M-x occur | 1302 | @item M-x occur |
| 1294 | Prompt for a regexp, and display a list showing each line in the | 1303 | Prompt for a regexp, and display a list showing each line in the |
| 1295 | buffer that contains a match for it. To limit the search to part of | 1304 | buffer that contains a match for it. To limit the search to part of |
| @@ -1300,16 +1309,22 @@ displayed before and after each matching line. | |||
| 1300 | @kindex RET @r{(Occur mode)} | 1309 | @kindex RET @r{(Occur mode)} |
| 1301 | @kindex o @r{(Occur mode)} | 1310 | @kindex o @r{(Occur mode)} |
| 1302 | @kindex C-o @r{(Occur mode)} | 1311 | @kindex C-o @r{(Occur mode)} |
| 1303 | The buffer @samp{*Occur*} containing the output serves as a menu for | 1312 | In the @samp{*Occur*} buffer, you can click on each entry, or move |
| 1304 | finding the occurrences in their original context. Click | 1313 | point there and type @key{RET}, to visit the corresponding position in |
| 1305 | @kbd{Mouse-2} on an occurrence listed in @samp{*Occur*}, or position | 1314 | the buffer that was searched. @kbd{o} and @kbd{C-o} display the match |
| 1306 | point there and type @key{RET}; this switches to the buffer that was | 1315 | in another window; @kbd{C-o} does not select it. Alternatively, you |
| 1307 | searched and moves point to the original of the chosen occurrence. | 1316 | can use the @kbd{C-x `} (@code{next-error}) command to visit the |
| 1308 | @kbd{o} and @kbd{C-o} display the match in another window; @kbd{C-o} | 1317 | occurrences one by one (@pxref{Compilation Mode}). |
| 1309 | does not select it. | 1318 | |
| 1310 | 1319 | @cindex Occur Edit mode | |
| 1311 | After using @kbd{M-x occur}, you can use @code{next-error} to visit | 1320 | @cindex mode, Occur Edit |
| 1312 | the occurrences found, one by one. @ref{Compilation Mode}. | 1321 | Typing @kbd{e} in the @samp{*Occur*} buffer switches to Occur Edit |
| 1322 | mode, in which edits made to the entries are also applied to the text | ||
| 1323 | in the originating buffer. Type @kbd{C-c C-c} to return to Occur | ||
| 1324 | mode. | ||
| 1325 | |||
| 1326 | The command @kbd{M-x list-matching-lines} is a synonym for @kbd{M-x | ||
| 1327 | occur}. | ||
| 1313 | 1328 | ||
| 1314 | @kindex M-s o | 1329 | @kindex M-s o |
| 1315 | @item M-s o | 1330 | @item M-s o |
| @@ -1317,9 +1332,6 @@ Run @code{occur} using the search string of the last incremental | |||
| 1317 | string search. You can also run @kbd{M-s o} when an incremental | 1332 | string search. You can also run @kbd{M-s o} when an incremental |
| 1318 | search is active; this uses the current search string. | 1333 | search is active; this uses the current search string. |
| 1319 | 1334 | ||
| 1320 | @item M-x list-matching-lines | ||
| 1321 | Synonym for @kbd{M-x occur}. | ||
| 1322 | |||
| 1323 | @item M-x multi-occur | 1335 | @item M-x multi-occur |
| 1324 | This command is just like @code{occur}, except it is able to search | 1336 | This command is just like @code{occur}, except it is able to search |
| 1325 | through multiple buffers. It asks you to specify the buffer names one | 1337 | through multiple buffers. It asks you to specify the buffer names one |
| @@ -448,7 +448,7 @@ pops up *Messages*" feature, which can now easily be changed. | |||
| 448 | +++ | 448 | +++ |
| 449 | *** C-y in Isearch is now bound to isearch-yank-kill, instead of | 449 | *** C-y in Isearch is now bound to isearch-yank-kill, instead of |
| 450 | isearch-yank-line. | 450 | isearch-yank-line. |
| 451 | --- | 451 | +++ |
| 452 | *** M-y in Isearch is now bound to isearch-yank-pop, instead of | 452 | *** M-y in Isearch is now bound to isearch-yank-pop, instead of |
| 453 | isearch-yank-kill. | 453 | isearch-yank-kill. |
| 454 | +++ | 454 | +++ |
| @@ -883,6 +883,7 @@ They are superseded by shift-select-mode enabled by default in 23.1. | |||
| 883 | 883 | ||
| 884 | * New Modes and Packages in Emacs 24.1 | 884 | * New Modes and Packages in Emacs 24.1 |
| 885 | 885 | ||
| 886 | +++ | ||
| 886 | ** Occur Edit mode applies edits made in *Occur* buffers to the | 887 | ** Occur Edit mode applies edits made in *Occur* buffers to the |
| 887 | original buffers. It is bound to "e" in Occur mode. | 888 | original buffers. It is bound to "e" in Occur mode. |
| 888 | 889 | ||