Structurally-Filtered 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 . 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
Unlike regular I-search, Harmonia's I-search allows 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.
Example: Cool
Cool supports the following filter commands:
Command |
Filters To |
M-s |
Strings |
M-c |
Class names |
M-m |
Method names |
M-v |
Variable declarations |
M-r |
Variable references |
M-t |
Comments |
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-c |
Class names |
M-i |
Interface names |
M-m |
Method or Constructor names |
M-f |
Field Names |
M-/ |
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-/ bar .
Additional Languages
To see the Harmonia I-search commands for Cool and Java, see the Commands Reference.
Next Section: Structurally-Filtered Views
|