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
create-editor-args
, making the following equivalent:
(apply create-editor args) (begin (set! create-editor-args args) (create-editor))
(console)
(x)
DISPLAY
environment variable to have been set to the appropriate
value before Scheme was started.
(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.
(#f)
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
auto-save files are named so: under unix, `foo.scm' will be saved
as `#foo.scm#'; on PCs it will be saved as `foo.s00', a backup
file with version `00' (which is never used as an actual version).
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.
This section documents all known differences between Edwin 3.82 and Emacs 18.57. A reference to a "documented" feature of Emacs means that the feature is documented in the GNU Emacs version 18 manual.
These are differences in design, unlikely to be `fixed'.
car
or call-with-current-continuation
.
comment-indent-hook
is defined differently. In Emacs, it is
called with no arguments and with point at the beginning of the comment;
in Edwin, it is called with a single argument, the mark at the beginning
of the comment, and with point undefined.
Scheme
and Scheme Interaction
modes, M-TAB completes
the Scheme variable name. Completion is environment-dependent, so a
prefix may complete differently (or not at all) in two different buffers
with different associated environments.
DOS Note: Since Alt+TAB is an MS Windows hot key, you can get the
same effect (without disabling it) by typing Alt+Ctrl+I.
text-mode-hook
is an event distributor rather than a
procedure of no arguments.
Deficiencies are shortcomings of Edwin that are likely to be fixed.
n view-emacs-news c-c describe-copying c-d describe-distribution c-w describe-warranty
v view this file. B byte-compile this file. M change this file's permissions. G change this file's group. O change this file's owner. C compress this file. U uncompress this file.
k mark file for copying y copy marked files
The following documented subsystems are implemented by Emacs but not by Edwin.
DOS Note:
Some modes are available under Unix, but are not included in the standard DOS edwin binary to reduce its size or because they don't work under DOS:
Missing Command or mode Reason ----------------------- ------ * dabbrev reduce size compile needs subprocess support shell needs subprocess support + there is a DOS replacement techinfo specific to MIT & Unix telnet needs subprocess support * midas mode (assembly language editing) reduce size * pascal mode reduce size texinfo reduce size man specific to unix print does not work yet * run-notifier reduce size * outline mode reduce size * info reduce size rcs needs subprocess support sendmail needs subprocess support malias useless without sendmail * occur (and list-matching-lines) reduce size rmail needs subprocess support + specific to Unix ? rmailsrt useless without rmail
Many of the missing modes and commands (compile, shell, rcs, sendmail) require subprocess support. They should be easy to bring up if subprocesses become available, however the code (or even the concept) may be Unix specific. There is a pseudo-shell mode for DOS.
Many of the subsystems listed above have not been tried under DOS.
The ones that are known to work are marked with an asterisk (*),
although for some of them variables have to be set appropriately
before use (e.g. info-directory
for info).
These commands are implemented by Emacs but not by Edwin. The commands marked with an asterisk are implemented by the unix version of Edwin but not by the PC version. Some of the asterisked comands can work in the PC version but the code to implement them is not loaded in order to save space; others are unix-specific and are not implemented on the PC.
abbrev-mode abbrev-prefix-mark add-change-log-entry add-change-log-entry-other-window add-global-abbrev add-mode-abbrev add-name-to-file append-to-buffer byte-compile-file byte-recompile-directory cancel-debug-on-entry * compile convert-mocklisp-buffer copy-to-buffer debug-on-entry define-abbrevs * delete-matching-lines * delete-non-matching-lines describe-copying describe-distribution describe-no-warranty describe-syntax disable-command disassemble display-time (run-notifier is similar) dissociated-press doctor edit-abbrevs edit-abbrevs-redefine edit-options edit-picture edit-tab-stops edit-tab-stops-note-changes edt-emulation-on emacs-lisp-mode emacs-version enable-command expand-abbrev expand-region-abbrevs flush-lines fortran-mode global-set-key (set-key is similar) grep hanoi indent-c-exp c-indent-expression insert-abbrevs insert-kbd-macro write-kbd-macro insert-parentheses inverse-add-global-abbrev inverse-add-mode-abbrev * keep-lines kill-all-abbrevs latex-mode Note: BAL has one lisp-complete-symbol (scheme-complete-variable is similar) lisp-interaction-mode (inferior-repl-mode is similar) lisp-mode lisp-send-defun list-abbrevs list-command-history list-options list-tags local-set-key * lpr-buffer * lpr-region make-symbolic-link make-variable-buffer-local * manual-entry modify-syntax-entry move-past-close-and-reindent next-error next-file nroff-mode * occur * occur-mode-goto-occurrence open-dribble-file open-termscript overwrite-mode plain-tex-mode prepend-to-buffer * print-buffer * print-region read-abbrev-file recover-file run-lisp save-buffers-kill-emacs save-buffers-kill-scheme set-gosmacs-bindings * shell-command * shell-command-on-region spell-buffer spell-region spell-string spell-word suspend-emacs suspend-scheme tab-to-tab-stop tags-apropos tex-mode top-level unexpand-abbrev vi-mode view-buffer view-emacs-news view-file vip-mode write-abbrev-file yow zap-to-char
These documented variables are implemented by Emacs but not Edwin. The variables marked with an asterisk are implemented by the unix version of Edwin, but not by the PC version.
abbrev-all-caps abbrev-file-name blink-matching-paren blink-matching-paren-distance buffer-read-only c-tab-always-indent comment-start-skip * compile-command completion-ignore-case (not documented) ctl-arrow debug-on-error debug-on-editor-error debug-on-internal-error debug-on-evaluation-error are similar, but more specific debug-on-quit default-directory default-major-mode echo-keystrokes initial-major-mode Scheme variable initial-buffer-mode insert-default-directory inverse-video kill-ring-max load-path * lpr-switches major-mode mark-ring mark-ring-max mark-ring-maximum meta-flag no-redraw-on-recenter save-abbrevs selective-display-ellipses * shell-file-name tab-stop-list tags-file-name (tags-table-pathname is similar) track-eol visible-bell
These documented variables are per-buffer in Emacs but not in Edwin.
abbrev-mode auto-fill-hook buffer-auto-save-file-name buffer-backed-up buffer-file-name buffer-offer-save buffer-read-only buffer-saved-size buffer-undo-list ctl-arrow default-directory local-abbrev-table major-mode mark-ring mode-name overwrite-mode selective-display selective-display-ellipses shell-prompt-pattern
Incorrect behavior of Edwin that will be fixed: