GNU Info

Info Node: (forms)Entering and Exiting Forms Mode

(forms)Entering and Exiting Forms Mode


Next: Forms Commands Prev: Forms Example Up: Top
Enter node , (file) or (file)node

Entering and Exiting Forms Mode
*******************************

`M-x forms-find-file <RET> CONTROL-FILE <RET>'
     Visit a database using Forms mode.  Specify the name of the
     *control file*, not the data file!

`M-x forms-find-file-other-window <RET> CONTROL-FILE <RET>'
     Similar, but displays the file in another window.

   The command `forms-find-file' evaluates the file CONTROL-FILE, and
also visits it in Forms mode.  What you see in its buffer is not the
contents of this file, but rather a single record of the corresponding
data file that is visited in its own buffer.  So there are two buffers
involved in Forms mode: the "forms buffer" that is initially used to
visit the control file and that shows the records being browsed, and
the "data buffer" that holds the data file being visited.  The latter
buffer is normally not visible.

   Initially, the first record is displayed in the forms buffer.  The
mode line displays the major mode name `Forms', followed by the minor
mode `View' if the data base is read-only.  The number of the current
record (N) and the total number of records in the file(T) are shown in
the mode line as `N/T'.  For example:

     --%%-Emacs: passwd-demo          (Forms View 1/54)----All-------

   If the buffer is not read-only, you may change the buffer to modify
the fields in the record.  When you move to a different record, the
contents of the buffer are parsed using the specifications in
`forms-format-list', and the data file is updated.  If the record has
fields that aren't included in the display, they are not changed.

   Entering Forms mode runs the normal hook `forms-mode-hooks' to
perform user-defined customization.

   To save any modified data, you can use `C-x C-s'
(`forms-save-buffer').  This does not save the forms buffer (which would
be rather useless), but instead saves the buffer visiting the data file.

   To terminate Forms mode, you can use `C-x C-s' (`forms-save-buffer')
and then kill the forms buffer.  However, the data buffer will still
remain.  If this is not desired, you have to kill this buffer too.


automatically generated by info2www version 1.2.2.9