SearchingEpsilon provides a set of flexible searching commands that incorporate incremental search. In the incremental-search command, Epsilon searches as you type the search string. Ctrl-s begins an incremental search forward, and Ctrl-r starts one in reverse. Any character that normally inserts itself into the buffer becomes part of the search string. In an incremental search, Ctrl-s and Ctrl-r find the next occurrence of the string in the forward and reverse directions, respectively. With an empty search string, Ctrl-s or Ctrl-r will either reverse the direction of the search, or bring in the previously used search string. (To retrieve older search strings, see Command History.)
You can use <Backspace> to remove characters from the search string, and enter control characters and meta characters (characters with the eighth bit set) in the search string by quoting them with Ctrl-q. (Type Ctrl-q Ctrl-j to search for a <Newline> character.) Use the Ctrl-g abort command to stop a long search in progress.
Typing <Enter> or <Esc> exits from an incremental search, makes Epsilon remember the search string, and leaves point at the match in the buffer.
While typing characters into the search string for incremental-search, a Ctrl-g quits and moves point back to the place the search started, without changing the default search string. During a failing search, however, Ctrl-g simply removes the part of the string that did not match.
If you type an editing key not mentioned in this section, Epsilon exits the incremental search, then executes the command bound to the key.
You can make Epsilon copy search text from the current buffer by typing Alt-<Down>. Epsilon will append the next word from the buffer to the current search string. This is especially convenient when you see a long variable name, and you want to search for other references to it. (It's similar to setting the mark and moving forward one word with Alt-f, then copying the text to a kill buffer and yanking it into the current search string.) Similarly, Alt-<PageDown> appends the next line from the current buffer to the search string. These two keys are actually available at almost any Epsilon prompt, though they're especially useful when searching. Alt-Ctrl-n and Alt-Ctrl-v are synonyms for Alt-<Down> and Alt-<PageDown>, respectively.
While Alt-<Down> and Alt-<PageDown> copy text from the buffer at point, using the word pulling keys F3, Ctrl-<Up> or Ctrl-<Down> copies text into the search string from other parts of the buffer; see Pulling Words.
You can change how Epsilon interprets the search string by pressing certain keys when you type in the search string. Pressing the key a second time restores the original interpretation of the search string.
Epsilon interprets the first character you type after starting a search with Ctrl-s or Ctrl-r a little differently. Normally, Ctrl-s starts an incremental search, with regular expression searching and word searching both disabled. If you type Ctrl-t or Ctrl-w to turn one of these modes on, Epsilon will also turn off incremental searching. Epsilon also pulls in a default search string differently if you do it immediately. It will always provide the search string from the last search, interpreting the string as it did for that search. If you retrieve a default search string at any other time, Epsilon will provide the last one consistent with the state of regular expression mode (in other words, the last regular expression pattern, if in regular expression mode, or the last non-regular-expression string otherwise).
There are other ways besides Ctrl-s or Ctrl-r to retrieve previous search strings. You can press Alt-<Up> or Ctrl-Alt-p to display a list of previous search patterns. Press <Enter> to select one. Or you can press Alt-g at a search prompt to retrieve the search string from your last search in the current buffer only. This can differ from the default search string you get when you use Ctrl-s or Ctrl-r, since those are not per-buffer.
The Ctrl-Alt-s and Ctrl-Alt-r commands function like Ctrl-s and Ctrl-r, but they start in regular-expression, non-incremental mode. You can also start a plain string search in non-incremental mode using the string-search and reverse-string-search commands. Some people like to bind these commands to Ctrl-s and Ctrl-r, respectively. Also see the search-positions-at-start variable.
Keep in mind that you can get from any type of search to any other type of search by typing the appropriate subcommands to a search. For example, if you meant to do a regex-search but instead typed Ctrl-s to do an incremental search, you could enter regex mode by typing Ctrl-t. The table summarizes the search subcommands.
When you're at the last match of some text in a buffer, and tell incremental search to search again by pressing Ctrl-s, Epsilon displays "Failing" to indicate no more matches. If you press Ctrl-s once more, Epsilon will wrap to the beginning of the buffer and continue searching from there. It will display "Wrapped" to indicate it's done this. If you keep on search, eventually you'll pass your starting point again; then Epsilon will display "Overwrapped" to indicate that it's showing you a match you've already seen. A reverse search works similarly; Epsilon will wrap to the end of the buffer when you keep searching after a search has failed. (You can set the search-wraps variable to zero to disable wrapping.)
In some modes like Info mode, where a buffer displays a single part of some larger collection of text, pressing Ctrl-s at a failing search results in a continued search, instead of wrapping. Epsilon displays "Continued" to indicate (in the case of Info mode) that it's searching through other nodes.
The forward-search-again and reverse-search-again commands search forward and backward (respectively) for the last-searched-for search string, without prompting. The search-again command searches in the same direction as before for the same search string.
The search-region command restricts searching to the current region, which will be highlighted during the search command.
If you highlight a region before searching, Epsilon uses it as an initial search string if it's not very long. Set the search-in-region variable to make Epsilon instead restrict matches it finds to the highlighted region, like the search-region command. Also see the search-defaults-from variable.
You can change the function of most keys in Epsilon by rebinding them (see Bindings). But Epsilon doesn't implement the searching command keys listed above with the normal binding mechanism. The EEL code for searching refers directly to the keys Ctrl-c, Ctrl-w, Ctrl-t, Ctrl-o, Ctrl-q, <Enter>, and <Esc>, so to change the function of these keys within searching you must modify the EEL code in the file search.e. Epsilon looks at your current bindings to determine which keys to use as the help key and backspace key. It looks at the abort_key variable to determine what to use as your abort key, instead of Ctrl-g. (See Interrupting a Command.) Epsilon always recognizes Ctrl-s and Ctrl-r as direction keys, but you can set two variables fwd-search-key and rev-search-key to key codes. These will then act as "synonyms" to Ctrl-s and Ctrl-r, respectively.
When you select a searching command from the menu or tool bar (rather than via a command's keyboard binding), Epsilon for Windows runs the dialog-search or dialog-reverse-search command, to display a search dialog.
Most of the keys described above also work in dialog-based searching. However, dialog searching is never incremental, so Ctrl-o doesn't toggle incremental searching in a dialog. And Ctrl-q doesn't quote the following character, because dialog searching doesn't support directly entering special characters.
To match special characters in dialog-based searching, you can enable
regular expression searching, and then enter them using syntax like
<Tab> or <#13>. See Entering Special Characters. In
replacement text, add a