New creates a new DrScheme window.
Open... opens a find-file dialog for choosing a file to load into a definitions window.
Open Recent lists recently opened files. Choosing one of them opens that file for editing.
Open URL... opens a dialog for choosing a Uniform Resource Locator (URL) to open in a new Help Desk window.
Revert re-loads the file that is currently in the definitions window. All changes since the file was last saved will be lost.
Save Definitions saves the program in the definitions window. If the program has never been saved before, a save-file dialog appears.
Save Definitions As... opens a save-file dialog for choosing a destination file to save the program in the definitions window. Subsequent saves write to the newly-selected file.
Save Other contains these sub-items
Save Definitions As Text... is like Save Definitions As..., but the file is saved in plain-text format (see DrScheme Files). Subsequent saves also write in plain-text format.
Save Interactions saves the contents of the interactions window to a file. If the interaction constants have never been saved before, a save-file dialog appears.
Save Interactions As... opens a save-file dialog for choosing a destination file to save the contents of the interactions window. Subsequent saves write to the newly-selected file.
Save Interactions As Text... is like Save Interactions As..., but the file is saved in plain-text format (see DrScheme Files). Subsequent saves are write in plain-text format.
Print Definitions... opens a dialog for printing the current program in the definitions window.
Print Interactions... opens a dialog for printing the contents of the interactions window.
Close closes this DrScheme window. If this window is the only open DrScheme window, DrScheme quits.
Quit or Exit exits DrScheme.
All Edit menu items operate on either the definitions or interactions window, depending on the location of the selection or blinking caret. Each window maintains its own Undo and Redo history.
Undo reverses an editing action. Each window maintains a history of actions, so multiple Undo operations can reverse multiple editing actions.
Redo reverses an Undo action. Each window maintains a history of Undo actions, so multiple Redo operations can reverse multiple Undo actions.
Cut copies the selected text to the clipboard and deletes it from the window.
Copy copies the selected text to the clipboard.
Paste pastes the current clipboard contents into the window.
Delete or Clear deletes the selected text.
Select All highlights the entire text of the buffer.
Wrap Text toggles between wrapped text and unwrapped text in the window.
Find opens a search dialog or, depending on the preferences, an interactive searching window attached to the frame.
Find Again finds the next occurrence of the text that was last searched for.
Replace & Find Again replaces the selection with the replace string (if it matches the find string) and finds the next occurrence of the text that was last searched for.
Opens a dialog where you can specify the parameters of a multi-file search. The results of the search are displayed in a separate window.
Shows all of the keybindings available in the current window.
Preferences... opens the preferences dialog. See section 3.2.
One each of the following show/hide pairs of menu items appears at any time.
Show Interactions shows interactions window.
Hide Interactions hides interactions window.
Show Definitions shows the definitions window.
Hide Definitions hides the definitions window.
Show Contour shows a ``20,000 foot'' overview window along the edge of the DrScheme window. Each pixel in this window corresponds to a letter in the program text.
Hide Contour hides the contour window.
Show Profile shows the current profiling report. This menu is only useful if you have enabled profiling in the Language dialog. Profiling does not apply to all languages. When it does, the checkbox that enables it is in the details portion of the dialog.
Hide Profile hides any profiling information currently displayed in the DrScheme window.
Split splits the current window in half to allow for two different portions of the current window to be visible simultaneously.
If the window has been split before, this menu item becomes enabled, allowing you to collapse the split window.
Note: whenever a program is executed, the interactions window is made visible if it is invisible.
Choose Language opens a dialog for selecting the current evaluation language. Click Execute to make the language active in the interactions window. See section 2.5 for more information about the languages.
Add Teachpack... opens a find-file dialog for choosing a teachpack to extend the current language. Click Execute to make the teachpack available in the interactions windows. See Extending DrScheme for information on creating teachpacks.
Clear All Teachpacks clears all of the current teachpacks. Click Execute to clear the teachpack from the interactions window.
In addition to the above menus, there is a menu item for each teachpack that clears only it.
Execute resets the interactions window and executes the program in the definitions window.
Break breaks the current evaluation.
Kill terminates the current evaluation.
Create Executable creates a separate launcher for running your program. See Executables for more info.
Module Browser... prompts for a file and then opens a window showing the module import structure for the module import DAG starting at the selected module.
The module browser window contains a square for each module. The squares are colored based on the number of lines of code in the module. If a module has more lines of code, it gets a darker color.
In addition, for each normal import, a blue line drawn is from the module to the importing module. Similarly, purple lines are drawn for each for-syntax import. In the initial module layout, modules to the left import modules to the right, but since modules can be moved around interactively, that property might not be preserved.
To open the file corresponding to the module, right click on the box for that module (control-click under Mac OS).
Reindent indents the selected text according to the standard Scheme formatting conventions. (Pressing the Tab key has the same effect.)
Reindent All indents all of the text in either the definitions or interactions window, depending on the location of the selection or blinking caret.
Comment Out puts ``;'' characters at each of the the beginning of each selected line of text.
Uncomment removes all ``;'' characters at the start of each selected line of text. Uncommenting only removes a ``;'' if it appears at the start of a line and it only removes the first ``;'' on each line.
Insert Text Box inserts a box into the window. The text box may contain arbitrary text, and it is treated as a value, like a number or symbol.
Insert Pasteboard Box inserts a graphics box. The box is treated as a value.
Insert Image... opens a find-file dialog for selecting an image file in GIF, BMP, XBM, or XPM format. The image is treated as a value.
Insert Fraction... opens a dialog prompting for a mixed-notation fraction and inserts that into the current editor.
Insert Large Letters... Opens a dialog asking for a line of text and inserts a large version of that (made with semicolons and spaces) into the current editor.
Inserts a Scheme box. These boxes contain Scheme code and are meant to be inside XML boxes. See also XML in DrScheme.
Inserts a Scheme splice box. These boxes are intended to be inside XML boxes. The Scheme expression inside must evaluate to a list and that list is spliced into the containing XML box. See also XML in DrScheme.
This menu item inserts an XML box. XML boxes must contain XML's concrete syntax and they evaluate to x-expressions, which are s-expressions representing the XML expression. See also XML in DrScheme.
Opens a window that lists all of the opened DrScheme frames. Selecting one of them brings the window to the front.
Brings the next window to the front.
Brings the previous window to the front.
Additionally, after the above menu items, this menu contains an entry for each window in DrScheme. Selecting a menu item brings the corresponding window to the front.
Help Desk Opens the Help Desk. This is the clearing house for all documentation about DrScheme and its language.
About DrScheme... Shows the credits for DrScheme.
Opens an internet connection to check if there have been any updates to various installed DrScheme packages.
This submenu has a list of related web sites. Choosing one of them sends a message to an external browser to visit the web site.
Is English your mother tongue?
This and the related menu items at the end of the Help menu switch DrScheme's interface (natural) language.
The preferences dialog comprises several panels:
Font
This panel controls the main font used by DrScheme.
Indenting
This panel controls which keywords DrScheme recognizes for indenting, and how each keyword is treated.
Editing
Auto-save files -- If checked, the editor generates autosave files (see DrScheme Files) for files that have not been saved after five minutes.
Backup files -- If checked, when saving a file for the first time in each editing session, the original copy of the file is copied to a backup file in the same directory. The backup files have the same name as the original, except that they end in either .bak or ~.
Map delete to backspace -- If checked, the editor treats the Delete key like the Backspace key.
Show status-line -- If checked, DrScheme shows a status line at the bottom of each window.
Count line and column numbers from one -- If checked, the status line's line:column counter counts from one. Otherwise, it counts from zero.
Display line numbers in buffer; not character offsets -- If checked, the status line shows a line:column display for the current selection rather than the character offset into the text.
Wrap words in editor buffers -- If checked, DrScheme editors auto-wrap text lines by default. Changing this preference affects new windows only.
Use separate dialog for searching -- If checked, then selecting the Find menu item opens a separate dialog for searching and replacing. Otherwise, selecting Find opens an interactive search-and-replace panel at the bottom of a DrScheme window.
Reuse existing frames when opening new files -- If checked, new files are opened in the same DrScheme window, rather than creating a new DrScheme window for each new file.
Enable keybindings in menus -- If checked, some DrScheme menu items have keybindings. Otherwise, no menu items have key bindings. This preference is designed for people who are comfortable editing in Emacs and find the standard menu keybindings interfere with the Emacs keybindings.
Automatically print to postscript file -- If checked, printing will automatically save postscript files. If not, printing will use the standard printing mechanisms for your computer.
Warnings
Ask before changing save format -- If checked, DrScheme consults the user before saving a file in non-text format (see DrScheme Files).
Verify exit -- If checked, DrScheme consults the user before exiting.
Only warn once when executions and interactions are not synchronized -- If checked, DrScheme warns the user on the first interaction after the definitions window, language, or teachpack is changed without a corresponding click on Execute. Otherwise, the warning appears on every interaction.
Scheme
Highlight between matching parens -- If checked, the editor marks the region between matching parenthesis with a gray background (in color) or a stipple pattern (in monochrome) when the flashing caret is next to a parenthesis.
Correct parens -- If checked, the editor automatically converts a typed ``)'' to ``]'' to match ``['', or it converts a typed ``]'' to ``)'' to match ``(``.
Flash paren match -- If checked, typing a closing parenthesis, square bracket, or quotation mark flashes the matching open parenthesis/bracket/quote.
HTTP Proxy
This preferences panel allows you to configure your HTTP proxy. Contact your system administrator for details.
Profiling
This preference panel configures the profiling report. The band of color shows the range of colors that profiled functions take on. Colors near the right are used for code that is not invoked often and colors on the right are used for code that is invoked often.
If you are interested in more detail at the low end, choose the ``Square root'' check box. If you are interested in more detail at the upper end, choose the ``Square'' check box.
Check Syntax
This panel controls the font and color styles used by the Check Syntax colorizations.
Most key presses simply insert a character into the editor (``a'', ``3'', ``('', etc.). Other keys and key combinations act as keyboard shortcuts that move the blinking caret, delete a line, copy the selection, etc. Keyboard shortcuts are usually trigger by key combinations using the Control, Meta, or Command key.
C-key
= This means press the Control key, hold it
down and then press key
and then release them
both. For example: C-e (Control-E) moves the blinking caret to the end
of the current line.
M-key
= Same as C-key
, except with the
Meta key. Depending on your keyboard, Meta may be called ``Left'',
``Right'' or have a diamond symbol, but it's usually on the bottom row next
to the space bar. M-key
can also be performed as a
two-character sequence: first, strike and release the Escape key, then
strike key
. Under Windows and Mac OS, Meta is only
available through the Escape key.
DEL = The Delete key.
SPACE = The Space bar.
Note: On most keyboards, ``<'' and ``>'' are shifted characters. So, to get M->, you actually have to type Meta-Shift->. That is, press and hold down both the Meta and Shift keys, and then strike ``>''.
Note: Many of the key bindings can also be done with menu items.
Under Windows, some of these keybindings are actually standard menu items. Those keybindings will behave according to the menus, unless the Enable keybindings in menus preference is unchecked.
If you are most familiar with Emacs-style key bindings, you should uncheck the Enable keybindings in menus preference. Many of the keybindings below are inspired by Emacs.
M-> move to end of file
C-p move to previous line (up)
M-C-p match parentheses backward
M-C-up move up from an embedded editor
M-C-k delete forward one S-expression
C-y paste from clipboard (yank)
M-C-t transpose sexpressions
M-C-k cut complete sexpression
C-x u undo
M-o toggle overwrite mode
f5 Execute
The interactions window has all of the same keyboard shortcuts as the definitions window plus a few more:
M-p bring the previously executed expression down to the prompt.
M-n bring the expression after the current expression in the expression history down to the prompt.
The standard extension for a Scheme program file is .scm. The extensions .ss and .sch are also acceptable.
DrScheme's editor can saves a program file in two different formats:
Plain-text format -- All text editors can read this format. DrScheme saves a program in plain-text format by default, unless the program contains images or text boxes. (Plain-text format does not preserve images or text boxes.)
Plain-text format is platform-specific because different platforms have different newline conventions. However, most tools for moving files across platforms support a ``text'' transfer mode that adjusts newlines correctly.
Multimedia format -- This format is specific to DrScheme, and no other editor recognizes it. DrScheme saves a program in multimedia format by default when the program contains images, text boxes, or formatted text.
Multimedia format is platform-independent. Use a ``binary'' transfer mode when moving multimedia-format files across platforms. (Using ``text'' mode may corrupt the file.)
When you modify an existing file in DrScheme and save it, DrScheme copies the old version of the file to a special backup file if no backup file exists. The backup file is saved in the same directory as the original file, and the backup file's name is generated from the original file's name:
Under Unix and Mac OS, a tilde (~) is added to the end of the file's name.
Under Windows, the file's extension is replaced with .bak.
When a file in an active DrScheme editor is modified but not saved, DrScheme saves the file to a special autosave file after five minutes (in case of a power failure or catastrophic error). If the file is later saved, or if the user exists DrScheme without saving the file, the autosave file is removed. The autosave file is saved in the same directory as the original file, and the autosave file's name is generated from the original file's name:
Under Unix and Mac OS, a pound sign (#) is added to the start and end of the file's name, then a number is added after the ending pound sign, and then one more pound sign is appended to the name. The number is selected to make the autosave filename unique.
Under Windows, the file's extension is replaced with a number to make the autosave filename unique.
On start-up, DrScheme reads configuration information from a preferences file. The name and location of the preferences file depends on the platform and user:2
Under Unix, preferences are stored in .plt-prefs.ss in the user's home directory.
Under Windows, if the HOMEDRIVE and HOMEPATH environment variables are defined, preferences are stored in %HOMEDRIVE%\%HOMEPATH%\plt-prefs.ss, otherwise preferences are stored in plt-prefs.ss in the directory containing the MrEd executable.
Windows NT, XP, 2000: When DrScheme is launched under Windows NT, XP, or 2000 and HOMEDRIVE and HOMEPATH are not set, Windows automatically sets the variables to indicate the root directory of the main disk. Therefore, when HOMEDRIVE and HOMEPATH are not set, the preferences file plt-prefs.ss is saved in the root directory of the main disk.
Under Mac OS X, preferences are stored in .plt-prefs.ss in the user's preferences folder. Under Mac OS Classic, preferences are stored in plt-prefs.ss in the system preferences folder.
If the user-specific preferences file does not exist, and the file plt-prefs.ss in the defaults collection does exist, then it is used for the initial preference settings. (See Library Collections and MzLib for more information about collections.) This file thus allows site-specific configuration for preference defaults. To set up such a configuration, start DrScheme and configure the preferences to your liking. Then, exit DrScheme and copy your preferences file into the defaults collection as plt-prefs.ss. Afterward, users have no preferences will get the preference settings you chose.
2 The MzScheme procedure find-system-path
returns the platform-specific path when given the argument
'pref-file
.