Structural Search
The XEmacs incremental search (I-search) feature has been extended in Harmonia-Mode by allowing you search for specific program features.
Using Harmonia's I-search
Original I-search
Just like with the XEmacs I-search, you can enter Harmonia's I-search mode by typing C-s
(or C-r
). The minibuffer will then display "I-search:
". At this point, you can type any sequence of characters, and XEmacs will show you all strings in the current buffer that match the sequence you typed.
Harmonia-mode's I-search supports all the features of XEmacs' built-in I-search. For more information the built-in I-search, see the XEmacs User's Manual.
Harmonia's Filtered Searches
Harmonia-mode adds value to the regular I-search by allowing you to filter searches to return specific types of structures.
Each language has a variety of structure-types to which you can filter a search. There is a keybinding for each type, that you can use to toggle each type's filter.
- To filter the current search to a type of structure, enter the structure's filter command after entering I-search mode.
- Entering the command again will remove the filter.
- Entering the command for a different filter will remove the old filter before adding the new one.
(Note: This behavior is configurable. For more information, see "Persistent I-search Structure Filters" in the Customization Reference section.)
Example: Cool
Cool supports the following filter commands:
Command |
Filters To |
M-t |
Class names |
M-m |
Method names |
M-v |
Variable names |
M-i |
Identifiers |
M-w |
Words |
M-c |
Comments |
M-s |
Strings |
To search for the next occurrence of a method with a name containing foo, type C-s M-m foo
.
To search for the previous occurrence of the word bar in a comment, type C-r M-c bar
.
Example: Java
Java supports the following filter commands:
Command |
Filters To |
M-t |
Class or Interface names |
M-m |
Method and Constructor names |
M-v |
Variable and Field Names |
M-i |
Identifier names |
M-w |
Words |
M-c |
Comments |
M-s |
Strings |
To search for the next occurrence of a method with a name containing foo, type C-s M-m foo
.
To search for the previous occurrence of the word bar in a comment, type C-r M-c bar
.
Additional Languages
To see the Harmonia I-search commands for additional languages, see the Key Bindings Reference.
Next Section: Elision