Go to the first, previous, next, last section, table of contents.
This chapter describes how to start Edwin, the MIT Scheme text editor. Edwin is very similar to GNU Emacs -- you should refer to the GNU Emacs manual for information about Edwin's commands and key bindings --- except that Edwin's extension language is MIT Scheme, while GNU Emacs extensions are written in Emacs Lisp. This manual does not discuss customization of Edwin.
To use Edwin, start Scheme with a world image containing Edwin (for
example by giving the `-edwin' command-line option), then call the
procedure edit
:
create-editor
with no arguments).
Otherwise, the previously-initialized editor is reentered.
This procedure is sometimes evaluated from the command line to start Scheme with Edwin running:
scheme -edwin -eval (edit)
inhibit-editor-init-file?
is true, however,
your init file will not be loaded even if it exists. By default, this
variable is false.
create-editor
is normally invoked automatically by edit
.
If no args are given, the value of create-editor-args
is
used instead. In other words, the following are equivalent:
(create-editor) (apply create-editor create-editor-args)
On the other hand, if args are given, they are used to update
codecreate-editor-args
, making the following equivalent:
(apply create-editor args) (begin (set! create-editor-args args) (create-editor))
(#f)
(x)
(x geometry)
(x)
except that geometry specifies the
window's geometry in the usual way. Geometry must be a character
string whose contents is an X geometry specification.
(console)
(pm)
(win32)
Once Edwin has been entered, it can be exited in the following ways:
suspend-edwin
). The call to the
procedure edit
that entered Edwin returns normally. A subsequent
call to edit
will resume Edwin where it was stopped.
save-buffers-kill-edwin
). This is like the suspend-edwin
command, except that a subsequent call to edit
will reinitialize
the editor.
suspend-scheme
). When Scheme is
resumed (using the command interpreter's job-control commands), Edwin is
automatically restarted where it was stopped. This command is identical
to the C-x C-z command of GNU Emacs.
save-buffers-kill-scheme
). Control is returned to the operating
system's command interpreter, and the Scheme process is terminated.
This command is identical to the C-x C-c command of GNU Emacs.
When Scheme exits abnormally it tries to save any unsaved Edwin buffers. The buffers are saved in an auto-save file in case the original is more valuable than the unsaved version. You can use the editor command M-x recover-file to recover the auto-saved version. The name used to specify an auto-save file is operating-system dependent: under Unix, and on PC file systems with long file names, `foo.scm' will be saved as `#foo.scm#'; on PC file systems with short file names, it will be saved as `foo.sav'.
The following Scheme procedures are useful for recovering from bugs in Edwin's implementation. All of them are designed for use when Edwin is not running -- they should not be used when Edwin is running. These procedures are designed to help Edwin's implementors deal with bugs during the implementation of the editor; they are not intended for casual use, but as a means of recovering from bugs that would otherwise require reloading the editor's world image from the disk.
edit
is called. If you encounter a fatal bug in Edwin, a good
way to recover is to first call save-editor-files
, and then to
call reset-editor
. That should completely reset the editor to
its initial state.
Go to the first, previous, next, last section, table of contents.