write-buffer - Write contents of buffer to named (new) file
n write-buffer "file-name" (C-x C-w)
write-buffer is used to write the contents of the buffer to a NEW file, use save-buffer(2) if the buffer is to be written to the existing file already associated with the buffer.
write-buffer writes the contents of the current buffer to the named file file-name. The action of the write also changes the file name associated with the current buffer to the new file name.
Unlike append-buffer(2), write-buffer always replaces an existing file and the new file inherits the buffers file characteristics instead of the old file's.
On writing the file, if time(2m) mode is enabled then the time stamp string is searched for in the file and modified if located, to reflect the modification date and time.
If the buffer contains a narrow(2m) it will automatically be removed before saving so that the whole buffer is saved and restored when saving is complete
If backup(2m) mode is enabled and the buffer is associated with a different file (compared with file-name) then any automatic save copies of the file associated with the buffer are deleted.
The argument n can be used to change the default behavior of save-buffer described above, n is a bit based flag where:-
0x01
0x02
undo(2) information is discarded when the file is written.
$auto-time(5), backup(2m), buffer-mode(2), change-file-name(2), save-buffer(2), append-buffer(2), time(2m).
(c) Copyright JASSPA 1999
Last Modified: 1998/07/10
Generated On: 1999/12/01