F - Print Facts.

Syntax:

F
F filename
FB    FE    FF    FN    FO    FV    F?

Examples:

f
fb
f /myfile

Options:

FB
lists information on every buffer, beginning with the current one. This information has the form
b(name) L,E filename

The name in parentheses is the buffer name. The number L is the line number of the current line and the number E is the number of lines in the buffer. A filename is displayed if the buffer has an associated file. If the buffer has been changed since the last time it was written out, there will be a ? at the end of the line. FRED also displays the ? if the buffer contents have never been saved in a file.

FE
lists the names of all patterns named with the E command, and gives a representation of each pattern. This representation is printed according to the options currently specified. The first pattern in the FE list is the pattern most recently used in a FRED command. FRED lists other patterns in alphabetical order according to their names.
FF
lists information on every buffer that has a file name associated with it. The information is given in the same form as FB, except that the L,E line numbers are omitted.
FN
lists information about every currently defined number register. FRED displays the name and value of each register. Values are printed according to the print format specified by any register format commands. If any register has been declared with an explicit base (e.g. octal or hexadecimal registers), the base is shown using the B option of the N command. Number registers are sorted according to name.
FO
lists all the options currently active. Options are given in the form of the command that set the option.
FV
gives information to indicate what version of FRED you're using.
F?
lists the name of the current buffer plus its associated file name, and then lists the name and file name of every buffer that is currently questionable.

Description:

F displays various facts about the current FRED session.

If the F is immediately followed by a new-line, FRED displays the name of the current buffer, the current value of ".", the number of lines in the buffer (the value of $), and the file name associated with the buffer. FRED displays ? at the end of the line if the buffer is questionable (i.e. if the buffer's contents have been changed since the last read or write operation in this buffer).

f filename

associates the given filename with the current buffer. At the same time, it marks the buffer as questionable.

If you type F, a space, then a new-line, FRED will remove the file name currently associated with the current buffer and clear the flag that marks the buffer as questionable.

The F commands that provide information about buffers always show the current buffer first. Then they show buffers containing files, sorted according to file name. Lastly they show buffers with no associated files, sorted according to buffer name.

For FE, FN, and FO, FRED displays information in the form of FRED commands. For example, the output of FO consists of the O commands needed to create the current option settings. This means that you can use the following trick:

zg(buf) fo
    "Change option settings and do work
\B(buf)

The ZG command collects the output of FO and stores it in buffer (buf). You can then change the options to anything you like. When you want to restore the old option settings, simply execute the contents of (buf).

The same trick works for FN. With FE, just put a T in front of the first character of the first line of output, as in

zb(buf) fe
   "Other commands
t\B(buf)

Copyright © 1998, Thinkage Ltd.