Buffer-change journal files may be quite large (even larger than the text files you edit). Because of the potential size of buffer-change journal files and because there is a journal file for each text buffer, you may want to define TPU$JOURNAL as a directory or subdirectory on a large disk, rather than as SYS$SCRATCH.
Buffer-change journal file names are derived from the name of the file or buffer being edited and the default file type for the operating system. To find out the name of the journal file for the current buffer, enter the SHOW command at the EVE prompt. The SHOW command displays the name of your input file, output file, your journal file, and other information about your current buffer.
Table 8-5 shows the buffer-change journal file names:
Text Buffer Name | Buffer-Change Journal File |
---|---|
JABBER.TXT | JABBER_TXT.TPU$JOURNAL |
GUMBO_RECIPE.RNO | GUMBO_RECIPE_RNO.TPU$JOURNAL |
MAIN | MAIN.TPU$JOURNAL |
LATEST NEWS | LATEST_NEWS.TPU$JOURNAL |
There are two ways to recover your edits with buffer-change journal files:
In the following example, you are editing a file named JABBER.TXT when a system failure interrupts your editing session. You then use system recovery to recover your edits.
$ EDIT/TPU JABBER.TXT . . . *** system failure *** . . . $ EDIT/TPU JABBER.TXT/RECOVER
To use the recover buffer command, follow this procedure:
Step | Task |
---|---|
1 |
Invoke EVE and enter the following command to recover your text:
Command: RECOVER BUFFER filename.txt If the buffer-change journal file is available, EVE shows the following information and asks if you want to recover that buffer:
|
2 |
Press the Return key to recover your buffer.
If you do not want to recover your buffer, type No and press the Return key. If you delete or rename the source file for recovery, the recovery fails. The source file is either the file initially read into the buffer (if any) or the last file written before the system failure. If the buffer you want to recover exists (usually the Main buffer), EVE first deletes that buffer and then does the recovery. If the buffer you want to recover has been modified, EVE asks you whether to delete the buffer before recovering. |
If you are unsure of the buffer names or journal file names, specify the asterisk (*) wildcard, as follows:
Command: RECOVER BUFFER *
EVE then displays a list of all your available journal files so you can choose the one you want. The list appears in an EVE system buffer named $CHOICES$ in a second window. For information about using the $CHOICES$ buffer, see the EVE online help topic called Choices Buffer.
To recover all your text buffers---one at a time---use the RECOVER BUFFER ALL command. EVE then tries to recover each text buffer for which there is a buffer-change journal available. The effect is the same as repeating the RECOVER BUFFER command without having to specify buffer names or journal file names. For each text buffer, EVE displays information such as the buffer name, the files associated with the buffer, and the time and date the journal file was created. EVE prompts you for one of the following:
Response | Effect |
---|---|
Yes | Recovers the buffer and then asks you whether to recover the next buffer, if there is one. This is the default response. Press the Return key. |
No | Skips this recovery. If there is another buffer to recover, EVE asks you about the other buffer. |
Quit | Cancels---does not recover the buffer and does not continue recovery operations. |
You can disable buffer-change journaling for a particular buffer by using the SET NOJOURNALING command. To disable buffer-change journaling for all your buffers, use the SET NOJOURNALING ALL command.
If you disabled buffer-change journaling, you can enable journaling by using the SET JOURNALING command. The following command enables journaling for a buffer named JABBER.TXT:
Command: SET JOURNALING JABBER.TXT
If you invoked EVE without journaling and then want to enable buffer-change journaling during the editing session, use the SET JOURNALING ALL command (which is the EVE default).
You cannot enable buffer-change journaling if the buffer has been modified. In such a case, EVE displays the following message:
Command: SET JOURNALING MEMO.TXT Buffer MEMO.TXT is not safe for journalingYou should first write out (save) the buffer by using the WRITE FILE or SAVE FILE command and then enable journaling.
EVE provides commands that let you format your text by setting margins, tabs, and word wrap. You can center lines, take extra white space out of text, and insert page breaks.
The following table shows EVE editing keys and describes their functions:
Key or Key Sequence | Function |
---|---|
Return or Ctrl/M | Inserts a carriage return at the current position either to start a new line of text or to terminate a command you are typing. On VT200, VT300, and VT400 series terminals, EVE also defines the Enter key as Return. |
Tab or Ctrl/I | Inserts a tab character at the current position according to the tab modes and at the tab stops currently set. |
Ctrl/L | Inserts a form-feed character at the current position to mark the beginning of a new page. A page break appears as a small double F (FF ) and is always on a line by itself. Same as INSERT PAGE BREAK. |
The following table shows EVE text formatting commands and describes their functions:
Command | Function |
---|---|
CAPITALIZE WORD | Changes the case of a word, making the first letter uppercase and the rest of the letters lowercase. Works on a range, box, or single word. |
CENTER LINE | Centers the current line between the left and right margins. The cursor moves with the line, remaining on the same character as the line moves. |
CONVERT TABS | Converts tab characters to the appropriate number of spaces in a box, a range, or the entire buffer. |
FILL | Reformats the current paragraph, range, or box according to the margins of the buffer, so the maximum number of words fits on a line. When you fill a select range or found range, the FILL or FILL RANGE command does not reformat a line that begins with a page break, a DIGITAL Standard Runoff (DSR) command, or DOCUMENT tag; it does reformat the other lines in the range. Filling a range does not delete blank lines. For more information about select range, see Section 8.10. |
FILL PARAGRAPH | Reformats the paragraph that the cursor is in according to the margins set for the buffer. When you fill a paragraph, the FILL command does not reformat a line that begins with a page break, DSR command, or DOCUMENT tag; it does reformat the other lines in the paragraph. |
FILL RANGE | Reformats the range or box according to the current margin settings. When you fill a select range or found range, the FILL or FILL RANGE command does not reformat a line that begins with a page break, DSR command, or DOCUMENT tag; it does reformat the other lines in the range. Filling a range does not delete blank lines. |
INSERT PAGE BREAK | Inserts a form-feed character at the current position to mark the beginning of a new page. A page break appears as a small double F (FF ) and is always on a line by itself. By default, Ctrl/L is defined as INSERT PAGE BREAK. |
LOWERCASE WORD | Changes the current word, range, or box to lowercase. |
PAGINATE | Inserts a "soft" page break for a 54-line page. A soft page break appears as a form feed followed by the null character (FF NL ). When you enter the PAGINATE command, EVE moves back to the previous page break (if any) then checks ahead for page breaks within the next 54 lines. If any soft breaks are found within those 54 lines, EVE removes them. EVE then moves down 54 lines, inserts a soft break, and puts the cursor on the next line. The soft break is inserted on a line by itself. If a hard page break (form feed only) is found within the 54 lines, EVE stops on the line after the hard break, in case you want to erase the break. |
SET LEFT MARGIN | Sets the left margin in the current buffer. The left margin must be greater than 0 but less than the right margin. By default, the left margin is 1 (leftmost column). |
SET RIGHT MARGIN | Sets the right margin for the current buffer. The right margin must be greater than the left margin. By default, the right margin is one less than the width. The width is typically 80, so the default margin is typically 79. |
SET PARAGRAPH INDENT | Specifies the number of spaces to be added to or subtracted from the first line of paragraphs you create or reformat. The default is 0 (no indent). |
SET TABS AT | Sets tab stops at the columns that you specify. The column numbers must be in ascending order and separated by spaces. By default, tab stops are set every eight columns. The command does not affect the hardware tab settings of your terminal. |
SET TABS EVERY | Sets tab stops at the specified interval. By default, tab stops are set every eight columns. The command does not affect the hardware tab settings of your terminal. |
SET TABS INSERT | Default setting. Changes the tab mode so that EVE inserts a tab character at the current column when you press the Tab key. The cursor and text move to the next tab stop. |
SET TABS MOVEMENT | Changes the tab mode so the Tab key becomes a cursor-movement key. Pressing the Tab key moves the cursor to the next tab stop but does not insert a tab character. |
SET TABS SPACES | Changes the tab mode to insert an appropriate number of spaces, rather than a tab character, when the Tab key is pressed. Previously existing tab characters are not affected. |
SET TABS INVISIBLE | Default setting. Makes tab characters invisible on the screen, appearing as white space. |
SET TABS VISIBLE | Makes tab characters visible on the screen, appearing as a small HT (horizontal tab). |
SET NOWRAP | Disables word wrapping at the right margin of the buffer. To start new lines, press the Return key or use the FILL command. |
SET WRAP | Default setting. Enables word wrapping at the right margin of the buffer. EVE starts new lines without your pressing the Return key or using the FILL command. |
UPPERCASE WORD | Changes the current word, range, or box to uppercase. |
Buffers are storage areas that exist only during an editing session. When you edit an existing file, EVE reads the contents of the file into a buffer. The highlighted status line contains the name of the buffer, its editing status (read-only or write), editing mode (insert or overstrike), and direction (forward or reverse).
The following table describes the EVE commands used to create, manipulate, and delete buffers:
Command | Function |
---|---|
BUFFER | Puts the specified buffer into the current window and moves the cursor to the last location it occupied in that buffer. If the specified buffer does not exist, creates a new buffer. |
DELETE BUFFER | Deletes a buffer you specify by name. |
GET FILE
or OPEN |
Puts the specified file into the current EVE window, creating a new buffer if necessary. If the file exists, EVE copies it into a new buffer in the current window. If the file does not exist, EVE creates a new, empty buffer, using the file name and file type for the buffer name. If there already is a buffer by that name, EVE asks for a different name to use. |
GO TO | Returns the cursor to the location labeled by the MARK command. If the labeled location is found in another buffer, EVE moves the cursor to that buffer and puts it into the current window. (Section 8.19.9 explains how to use multiple buffers in an editing session.) |
INCLUDE FILE | Inserts the contents of the specified file into the current buffer at the line above the cursor location. This is useful to combine files. |
NEW | Creates a new buffer named Main and puts it into the current window. If the buffer Main already exists, EVE asks for a name for the new buffer. |
NEXT BUFFER | Puts the next buffer (if one exists) into the current window and moves the cursor to the last position it occupied in that buffer. This command lets you move from one buffer to another without specifying a buffer name. |
OPEN SELECTED | Opens a file whose name you have selected or found. This command is the same as using the GET FILE or OPEN command without having to type the file name. |
REMOVE
or CUT |
If you are in the Buffer List buffer, same as DELETE BUFFER. Use the REMOVE command as follows to delete a buffer without typing the buffer name: enter the SHOW BUFFERS command (which puts you in the Buffer List buffer), move the cursor to the name of the buffer you want to delete, and enter the REMOVE command. |
SAVE FILE | Writes the contents of the current buffer to the file associated with the buffer without ending the editing session. If you do not specify a file name with the SAVE FILE command, EVE prompts you for an output file specification. Similar to WRITE FILE. |
SAVE FILE AS | Writes the contents of the current buffer to the file you specify without ending the editing session. For example, if you are editing a file named FIRST.DAT, you can save it as SECOND.TXT. This command does not change the name of the buffer. It does, however, associate the buffer with the file you name so that any subsequent SAVE FILE, WRITE FILE, or EXIT command writes the buffer to the file you named. This command requires you to supply a file specification. |
SELECT
or RETURN |
If you are in the Buffer List buffer, selects the buffer you specify. Use the SELECT command as follows to select a buffer without typing the buffer name: enter the SHOW BUFFERS command, move the cursor to the name of the buffer you want to select, and enter the SELECT command. |
SET BUFFER | Lets you specify the editing status of the buffer: whether the buffer can be modified or can be written to a file when you exit from EVE. |
SHOW | Displays information about the buffers you have created during the editing session. If more than one buffer is active in your editing session, the SHOW command displays information about the buffer you are currently editing. For information about the other active buffers, press the Do key. To resume editing, press any other key. |
SHOW BUFFERS | Lists the buffers you have created during an editing session. You can move the cursor through the list and specify a particular buffer for viewing by pressing the Select key. |
SHOW DEFAULTS BUFFER | Shows information, such as margins, tab stops, direction, mode, and maximum lines, about the EVE system buffer named $DEFAULTS$. These are the default settings used when you create new buffers. |
SHOW SYSTEM BUFFERS | Lists the system buffers created by EVE, such as the Message buffer, Help buffer, Insert Here buffer, and $RESTORE$ buffer. You can move the cursor through the list and specify a buffer for viewing by pressing the Select key. |
WRITE FILE | Writes the contents of the current buffer to the file associated with the buffer or to the file you specify on the command line without ending the editing session. If the current buffer does not have a file specification associated with it, EVE prompts you for an output file specification. Similar to SAVE FILE. |
To display more information about the current buffer, enter the SHOW command. The information displayed includes whether the buffer has been modified, in addition to the following:
If more than one buffer is active during an editing session, EVE prompts you to press the Do key to get information about other buffers.
To delete a buffer, enter the DELETE BUFFER command and specify the name of the buffer you want to delete. If the buffer is empty or unmodified, EVE deletes it. If, however, the buffer has been modified, EVE prompts you for a choice. Note that the buffer name must be typed in full; no abbreviations are allowed. If you are viewing a buffer that you want to delete, EVE replaces the buffer with the oldest buffer existing in the editing session.
The following table lists the choices you can enter:
Keyword | Effect |
---|---|
DELETE_ONLY | Deletes the specified buffer. |
WRITE_FIRST | Writes out (saves) the specified buffer, then deletes it. |
QUIT | Default choice. The buffer is not deleted. |
In the following example, deletion of the modified buffer MYFILE.TXT is requested:
Command: DELETE BUFFER MYFILE.TXT That's a modified buffer. Type delete_only, write_first, or quit:
Use the SET BUFFER command to change the editing status of the buffer; that is, whether the buffer can be modified and whether the buffer will be written to a file after you exit from EVE.
You can specify one of the following keywords for each command:
Keyword | Effect |
---|---|
MODIFIABLE | Default setting. The buffer can be modified. Also restores the previous mode of the buffer (insert or overstrike). |
READ_ONLY | The buffer is not saved (written out) on exiting, even if it has been modified (opposite of WRITE). Also sets the buffer to unmodifiable. However, you can set it to modifiable. |
UNMODIFIABLE | The buffer cannot be modified. Also overrides the mode of the buffer (insert or overstrike). |
WRITE | Default setting. The buffer is saved (written out) on exiting if it has been modified (opposite of READ_ONLY). If a buffer is read-only or unmodifiable, SET BUFFER WRITE makes it modifiable and restores its previous mode (insert or overstrike). |
By default, buffer status is set to MODIFIABLE and WRITE, letting you change the contents of a buffer and save the changed buffer in a file.
To change the status of a buffer so that its contents cannot be inadvertently changed, set the buffer to READ_ONLY (which implies unmodifiable) with the following command:
Command: SET BUFFER READ_ONLY
To change the status of a buffer so it becomes a temporary storage area (a "scratchpad"), set the buffer to READ_ONLY and MODIFIABLE with the following commands:
Command: SET BUFFER READ_ONLY Command: SET BUFFER MODIFIABLE
You then can edit the buffer, but it will not be saved when you exit from EVE.
EVE uses the message window, which appears at the bottom of the screen, to communicate error and informational messages during an editing session. The message window displays the last message in the Messages buffer.
You can display these messages with the BUFFER command. To display the contents of the Messages buffer, press Do and enter the command BUFFER MESSAGES. To return to the buffer you were editing, press Do and enter the BUFFER command followed by the name of the appropriate buffer.
You can also enter the SHOW BUFFERS command to display the buffers you have created and press the Select key to choose a buffer.
You can use several buffers if you want to edit more than one file or if you want temporary storage areas for manipulating blocks of text. You can use one of the following commands to create a new buffer: GET FILE or OPEN, OPEN SELECTED, or BUFFER.
To create a new buffer with a file that already exists, enter the GET FILE (or OPEN) command and the name of the file you want to copy to the new buffer. You can use the asterisk (*) wildcard character as a substitute for all or some of the characters in the file name and file type. You can use the percent sign (%) wildcard character as a substitute for one character in the file name and file type, and you can use the ellipsis ([...]) wildcard as a substitute for a directory specification.
You can also use the OPEN SELECTED command to create a new buffer as follows:
To put a specific buffer into the current EVE window, enter the BUFFER command and the name of the buffer you want to put in the current window. You cannot use wildcard characters in buffer names. The asterisk (*) and percent sign (%) are treated as literal characters in a buffer name. If the buffer you specify does not already exist, EVE creates a new buffer.
If the specified file exists, EVE reads the contents of the file into a new buffer and displays the buffer in the current window. If there is more than one match for a file specification with a wildcard, EVE displays a list of choices in the $CHOICES$ buffer and prompts you to provide a more complete file specification. EVE will open the first file it matches if you use a search list or an ellipsis ([...]) wildcard. Otherwise, EVE creates an empty buffer and displays the buffer in the current window.
To change the buffer in the current window, press the Do key, type BUFFER and the name of the buffer you want to display on the screen, and then press the Return key. If you forget a buffer name, enter the SHOW BUFFERS command to display the names of active buffers in your editing session and specify a buffer with the Select key.
There are four ways to read a file into an EVE buffer:
To write the contents of the current buffer to a file, enter the WRITE FILE command. You can include a file specification with the WRITE FILE command. If you do not include a file specification, EVE uses the input file specification to write the file. If you created the current buffer with the BUFFER or NEW command, EVE prompts you for a file specification to which it writes the file.
The following example shows how to use the output file associated with the buffer to write out a buffer:
Command: GET FILE RHYMES.DAT . . . Command: WRITE FILE 3 lines written to WORKDISK:[USER]RHYMES.DAT;2
During an EVE editing session, the buffer you are editing is displayed on the screen in a window. A highlighted status line appears at the bottom of the window identifying the name, current editing mode, and current direction of the buffer.
6489P013.HTM OSSG Documentation 22-NOV-1996 13:16:52.74
Copyright © Digital Equipment Corporation 1996. All Rights Reserved.