Messages concerning file output

If the writing of a file is successful, the editor will return with a message indicating the number of lines written.

If the .bak version of a file is not a proper file (e.g. a read only file), no backup can be made and the editor returns one of the error messages : "Cannot move old file to backup.", "Cannot remove old backup." or "Cannot make a proper backup.". The write command will not be executed in this case.

If anything goes wrong during the writing of a file, the writing will be aborted with the message "Error while writing" or "Error while writing. Disk full?". This may indicate one of several things:

If in doubt as to whether enough space on a disk exists, one can find out the amount of free disk space with the ? command (see the section on `Free disk space' p. [*]) and the length of the file to be written can be found with the = command. If there is indeed not enough disk space, one could use another disk with enough space or (on mainframes) get your systems administrator to give you a larger file quota. Alternatively one should remove some files - see Execute an external command p. [*]). Another alternative (if you are not working with a shell) is to overwrite an unimportant existing file by writing an empty buffer to that file, and selecting the option `No backup'. This effectively erases the file, replacing it with the new and empty one. It is anyway a wise policy to always keep at least one empty formatted disk on hand for such emergencies.

To do the writing quickly the editor needs a buffer of about 9 Kbytes. If this memory is not available the subsequent action will depend on the system. On some systems memory it is borrowed from the screen. A message will indicate that this is the case and a band of noise will appear on the screen. After the writing is finished, the screen will be restored. If such an emergency operation cannot be performed writing cannot take place and the user should try to remove some of the contents of the buffers before trying again. If there is a particularly lengthy block of key redefinitions (9 Kbytes is very much here!) one might try to remove the key redefinitions instead with the K0 command. This command can be looked up in the chapter on key redefinitions p. [*].