9.1.2 Save a separate working copy

Use this route before editing a document whose original you want to preserve. It writes the current buffer text, including unsaved edits, to a new filename and makes that new file the buffer’s saving destination.

  1. Select the source document and check its identity. Press C-x C-w, replace the proposed filename with an unused path such as ~/evox-notes-copy.txt, and press RET. Keep the appropriate extension for the document, for example .org for Org notes. Cancel an unexpected overwrite prompt and choose another name.
  2. Read the save result and check the new destination with C-h v buffer-file-name RET when necessary. A permission or write error is not a completed save. Keep the buffer open while correcting the problem; do not discard the only copy of unsaved text.
  3. Return to that document, make the intended changes, and press C-x C-s. This saves to the new destination. The old saved file remains at its old path. You can open it separately with C-x C-f to compare it with the copy.

C-x C-w does not keep the buffer attached to both files. After it succeeds, later C-x C-s saves update the new file. The old file retains its previously saved content, not any unsaved changes that were written only to the copy. Changing the filename is also not a format converter: naming plain text with .docx does not create a Word document.

To duplicate the last saved file while leaving the working buffer’s destination unchanged, use M-x copy-file RET instead. Answer its source and destination prompts with paths. It copies the file on disk, not unsaved buffer edits, and does not switch you into the new copy. Open the destination separately to work on it. See Save commands and Copying and naming files in the GNU Emacs Manual for other saving and copying operations.

If Emacs reports that another program changed the original, do not force a save or revert simply to clear the warning. Keep your buffer, preserve its text under an unused filename if needed, and compare the versions before deciding which changes to keep. Simultaneous editing explains that conflict.