www.delorie.com/gnu/docs/emacs/forms_1.html   search  
Buy the book!

Forms Mode User's Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Forms Example

Let's illustrate Forms mode with an example. Suppose you are looking at the `/etc/passwd' file, and the screen looks like this:

====== /etc/passwd ======

User : root   Uid: 0   Gid: 1

Name : Super User

Home : /

Shell: /bin/sh

As you can see, the familiar fields from the entry for the super user are all there, but instead of being colon-separated on one single line, they make up a forms.

The contents of the forms consist of the contents of the fields of the record (e.g. `root', `0', `1', `Super User') interspersed with normal text (e.g `User : ', `Uid: ').

If you modify the contents of the fields, Forms mode will analyze your changes and update the file appropriately. You cannot modify the interspersed explanatory text (unless you go to some trouble about it), because that is marked read-only (see section `Text Properties' in The Emacs Lisp Reference Manual).

The Forms mode control file specifies the relationship between the format of `/etc/passwd' and what appears on the screen in Forms mode. See section 5. Control File Format.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003