IDE DialogToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Moderately revised from 10.0.
10.0 version

Find in Files

This dialog searches files, editor buffers, or project files for the string specified in the Find String field.

The Find String field

Enter the string (without quotation marks) to be searched for. Once you have entered the string, click on Search or press Enter to start the search.

The Filter field

This field has an effect when searching a directory or a project, but not when searching editor buffers. Only files matching the specification (in the illustration, files with type cl, lsp, lisp, or jil) are searched. The filter may contain multiple filters separated by semicolons, for example *.cl;*.lsp;*.lisp;jil, as in the illustration. The filters are kept in a history list. The filter wildcard may also be directly appended to the search directory, as in c:\allegro-projects\*.cl.

The Search and Open buttons

Clicking on Search, equivalent to pressing Enter in the Find String field, initiates or updates the search.

Clicking on Open when a file or editor buffer listed in the results field is selected opens that file or displays the buffer.

The Include Subdirectories or Subprojects checkbox

When checked when searching files, all files in all subdirectories of the specified directory are searched. If unchecked, only the files in the specified directory are searched.

When checked while searching a project, the entire project hierarchy is searched. When unchecked, only the top-level project is searched.

The Case-Sensitive checkbox

When checked, letter characters in the searched files and/or editor buffers are considered to match only when they are the same string case as in the search string. When unchecked, either case will match.

The Search Subprojects Later (rather than in project load order) checkbox

When checked, searching a project will search subprojects only after searching all files in the top-level project. That can help find matches more quickly in the main project, which is likely of more interest. When unchecked, all files are searched in the same order in which they are loaded (where subprojects are loaded first). That can help determine when things are not defined in the best order, such as using a defparameter before defining it.

The value of this check box will be remembered across Lisp sessions as the user option find-in-files-search-subprojects-later, assuming options are saved.

The Search field

The search can be in editor buffers, in a project loaded into the running Lisp (whether the current project or not), or in files in the specified directory, as the appropriate radio button is selected. Use the Browse button to choose a directory using standard Windows tools.

When the Find In Files dialog is first used in an IDE session, it will initially be set to search the current project if there is an open project at the time, and otherwise to search a directory.

Also when opening a project, the default directory for the file selection dialog is now set to the path of the project. Note that this default is still overridden when using the file selection dialog in the IDE editor (where it defaults to the directory of the selected editor buffer) unless the context-sensitive-default-path configuration property is turned off.

The results field

Files or buffers in which the string appears are listed here. The folder containing a file is shown along with the number of occurrences in the file or buffer. If you select a file or buffer and open it by clicking the Open button or pressing Enter (or equivalently double-clicking the file or buffer name), the first instance of the string is highlighted in the editor, and clicking Search | Find Again finds the next occurrence.

Regarding HTML Files

When a file that is opened from the Find In Files dialog has a file type of htm, html, or shtml, then the file is displayed in an HTML browser program rather than in the IDE editor. Either invoke-html-browser or invoke-private-html-browser is used, depending on the value of the use-private-html-browser configuration option.

The matching text lines field

When a matching file is selected in the results field, the particular text lines in that file that contain the matches are listed in this widget at the bottom of the dialog. This may allow you to see whether the selected file is of interest without opening it in the editor. You can jump directly to one of these text lines in the editor either by double-clicking on a particular text line or by selecting it and then pressing the Enter key or clicking the Open button. An invisible split-bar just above this widget allows you to stretch it taller to see more matching lines.

An editor shortcut for viewing the next file with matches

When the editor is selected, you can quickly display the next file in the Find In Files dialog's list of matching files by typing Control-8. This keystroke emulates switching back to the Find In Files dialog, selecting the next file in the results field, and opening it. You would typically do this just after Search | Find Again reports no more matches in the current editor buffer. (To see other special editor keystrokes that aren't on the IDE's menu bar, use Help | Shortcut Keys.)


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page has had moderate revisions compared to the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Moderately revised from 10.0.
10.0 version