Next: , Previous: , Up: Backup   [Contents][Index]


14.3.1.1 Single or Numbered Backups

If you choose to have a single backup file (the default), the backup file’s name is constructed by appending ‘~’ to the file name being edited; thus, the backup file for eval.c is eval.c~.

If you choose to have a series of numbered backup files, backup file names are made by appending ‘.~’, the number, and another ‘~’ to the original file name. Thus, the backup files of eval.c would be called eval.c.~1~, eval.c.~2~, and so on, through names like eval.c.~259~ and beyond.

If protection stops you from writing backup files under the usual names, the backup file is written as %backup%~ in your home directory. Only one such file can exist, so only the most recently made backup is available.

The choice of single backup or numbered backups is controlled by the variable version-control. Its possible values are:

t

Make numbered backups.

nil

Make numbered backups for files that have numbered backups already. Otherwise, make single backups.

never

Never make numbered backups; always make single backups.

version-control may be set locally in an individual buffer to control the making of backups for that buffer’s file. For example, Rmail mode locally sets version-control to never to make sure that there is only one backup for an Rmail file. See Locals.