3 Forms Commands

The commands of Forms mode belong to the C-c prefix, with one exception: TAB, which moves to the next field. Forms mode uses different key maps for normal mode and read-only mode. In read-only Forms mode, you can access most of the commands without the C-c prefix, but you must type ordinary letters instead of control characters; for example, type n instead of C-c C-n.

If your Emacs has been built with X-toolkit support, Forms mode will provide its own menu with a number of Forms mode commands.

C-c C-n

Show the next record (forms-next-record). With a numeric argument n, show the nth next record.

C-c C-p

Show the previous record (forms-prev-record). With a numeric argument n, show the nth previous record.

C-c C-l

Jump to a record by number (forms-jump-record). Specify the record number with a numeric argument.

C-c <

Jump to the first record (forms-first-record).

C-c >

Jump to the last record (forms-last-record). This command also recalculates the number of records in the data file.

TAB
C-c TAB

Jump to the next field in the current record (forms-next-field). With a numeric argument n, jump forward n fields. If this command would move past the last field, it wraps around to the first field.

C-c C-q

Toggles read-only mode (forms-toggle-read-only). In read-only Forms mode, you cannot edit the fields; most Forms mode commands can be accessed without the prefix C-c if you use the normal letter instead (for example, type n instead of C-c C-n). In edit mode, you can edit the fields and thus change the contents of the data base; you must begin Forms mode commands with C-c. Switching to edit mode is allowed only if you have write access to the data file.

C-c C-o

Create a new record and insert it before the current record (forms-insert-record). It starts out with empty (or default) contents for its fields; you can then edit the fields. With a numeric argument, the new record is created after the current one. See also forms-modified-record-filter in Modifying The Forms Contents.

C-c C-k

Delete the current record (forms-delete-record). You are prompted for confirmation before the record is deleted unless a numeric argument has been provided.

C-c C-s regexp RET

Search forward for regexp in all records following this one (forms-search-forward). If found, this record is shown. If you give an empty argument, the previous regexp is used again.

C-c C-r regexp RET

Search backward for regexp in all records following this one (forms-search-backward). If found, this record is shown. If you give an empty argument, the previous regexp is used again.

M-x forms-prev-field

Similar to forms-next-field but moves backwards.

M-x forms-save-buffer
C-x C-s

Forms mode replacement for save-buffer. When executed in the forms buffer it will save the contents of the (modified) data buffer instead. In Forms mode this function will be bound to C-x C-s.

M-x forms-print

This command can be used to make a formatted print of the contents of the data file.

In addition the command M-x revert-buffer is useful in Forms mode just as in other modes.

The following function key definitions are set up in Forms mode (whether read-only or not):

NEXT

forms-next-record

PRIOR

forms-prev-record

BEGIN

forms-first-record

END

forms-last-record

S-TAB

forms-prev-field