Previous: Formatted Text, Up: Text


30.13 Editing Text-based Tables

Table Mode provides an easy and intuitive way to create and edit WYSIWYG text-based tables. Here is an example of such a table:

     +-----------------+--------------------------------+-----------------+
     |     Command     |          Description           |   Key Binding   |
     +-----------------+--------------------------------+-----------------+
     |  forward-char   |Move point right N characters   |       C-f       |
     |                 |(left if N is negative).        |                 |
     |                 |                                |                 |
     |                 |On reaching end of buffer, stop |                 |
     |                 |and signal error.               |                 |
     +-----------------+--------------------------------+-----------------+
     |  backward-char  |Move point left N characters    |       C-b       |
     |                 |(right if N is negative).       |                 |
     |                 |                                |                 |
     |                 |On attempt to pass beginning or |                 |
     |                 |end of buffer, stop and signal  |                 |
     |                 |error.                          |                 |
     +-----------------+--------------------------------+-----------------+

Table Mode allows the contents of the table such as this one to be easily manipulated by inserting or deleting characters inside a cell. A cell is effectively a localized rectangular edit region and edits to a cell do not affect the contents of the surrounding cells. If the contents do not fit into a cell, then the cell is automatically expanded in the vertical and/or horizontal directions and the rest of the table is restructured and reformatted in accordance with the growth of the cell.