Go to the first, previous, next, last section, table of contents.

Edwin

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.

Starting 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:

procedure+: edit
procedure+: edwin
Enter the Edwin text editor. If entering for the first time, the editor is initialized (by calling 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)

The procedure edwin is an alias for edit.

variable+: inhibit-editor-init-file?
When Edwin is first initialized, it loads your init file (called `~/.edwin' on unix, `edwin.ini' on PCs) if you have one. If the Scheme variable inhibit-editor-init-file? is true, however, your init file will not be loaded even if it exists. By default, this variable is false.

procedure+: create-editor arg ...
Initializes Edwin, or reinitializes it if already initialized. 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))

variable+: create-editor-args
This variable controls the initialization of Edwin. The following values are defined:

(console)
This says to run Edwin on Scheme's console, or in unix terminology, the standard input and output. If the console is not a terminal device, or is not powerful enough to run Edwin, an error will be signalled at initialization time.
(x)
This says to create an X window and run Edwin on it. This requires the DISPLAY environment variable to have been set to the appropriate value before Scheme was started.
(x geometry)
This is like (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)
This is the default. It says to try running Edwin on Scheme's console, and failing that, to create an X window and run Edwin on that. This signals an error if neither the console nor the X display is usable.

Leaving Edwin

Once Edwin has been entered, it can be exited in the following ways:

C-x z
Stop Edwin and return to Scheme (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.
C-x c
Offer to save any modified buffers, then kill Edwin, returning to Scheme (save-buffers-kill-edwin). This is like the suspend-edwin command, except that a subsequent call to edit will reinitialize the editor.
C-x C-z
Stop Edwin and suspend Scheme, returning control to the operating system's command interpreter (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.
C-x C-c
Offer to save any modified buffers, then kill both Edwin and Scheme (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.

Last Resorts

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.

procedure+: save-editor-files
Examines Edwin, offering to save any unsaved buffers. This is useful if some bug caused Edwin to die while there were unsaved buffers, and you want to save the information without restarting the editor.

procedure+: reset-editor
Resets Edwin, causing it to be reinitialized the next time that 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.

procedure+: reset-editor-windows
Resets Edwin's display structures, without affecting any of the buffers or their contents. This is useful if a bug in the display code causes Edwin's internal display data structures to get into an inconsistent state that prevents Edwin from running.

Comparison of Edwin 3.82 to Emacs 18.57

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.

Incompatibilities

These are differences in design, unlikely to be `fixed'.

Deficiencies

Deficiencies are shortcomings of Edwin that are likely to be fixed.

Missing Subsystems

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).

Missing Commands

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

Missing Variables

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

Per-Buffer Variables

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

Edwin Bugs

Incorrect behavior of Edwin that will be fixed:


Go to the first, previous, next, last section, table of contents.