Next: , Previous: , Up: rec-mode: an Emacs mode for editing recfiles   [Contents][Index]


4 Summary mode

Besides the standard viewing modes of buffers, there is also a third option called summary mode. Summary mode is a tabulated list of the record in which each record is a row in the table. The columns in the table are determined by user input, or alternatively, by special keys in the current file.

h
M-x rec-cmd-show-summary

Creates a summary buffer from the current type being viewed in the recfile. The columns are based on user input (prompted), or if the record has either a %summary or %key in its descriptor, those fields are used.

The input for the summary query is a field expression, a comma-separated list of column names. Thus, if your recfile looks like the following:

Name: Ada Lovelace
Age: 36

Name: Peter the Great
Age: 53

Name: Matusalem
Age: 969

Then calling rec-cmd-show-summary and entering Name,Age would create a table of all records with those columns. If your record descriptor contains a %summary like below:

%summary: Age,Name

then this is used as the field expression instead. Similarly, if no %summary field is defined and a %key field exists, then that field is used.

Calling this command enters record summary mode, which a a major mode derived from tabulated list mode (see (elisp)Tabulated List mode). In this mode, the following bindings are available:

n
M-x rec-summary-cmd-next

Go to the next record in the summary.

Navigation inside the summary buffer maintains the position of the associated recfile buffer, and vice versa. The currently active record in the recfile is shown highlighted in the buffer. As a result, the summary can be thought of as a useful “overview” overview for any recfile buffer.


Next: Selecting records, Previous: Edition modes, Up: rec-mode: an Emacs mode for editing recfiles   [Contents][Index]