I was wondering if there is a way to make emacs stop making backups of files with the ~ at the end. (herpderp.html~) I am currently using windows xp 32 bit with emacs 23. Does anyone know how to make this stop?

  • ~ usually means temp file. Why do you want this to change? – soandos Feb 16 '12 at 14:23
  • well if i have a folder with some script files their are a ton of extra files that dont go away afterwards, is there a way to hide them? thanks – Shantanu Feb 16 '12 at 18:36

You can use the variable backup-inhibited. Setting it to non-nil means "no backups".


To save the backup files in a different place you can customize backup-directory-alist. It consists of a list of pairs. The first in the pair is a regex to match the file name, and the second is the directory to save them in. If nothing matches then the backup files are saved in the same directory as the original. Below will save all backup files to ~/.emacs.d/backups where they are out of the way until you need them.

(setq backup-directory-alist '(("." . "~/.emacs.d/backups")))
  • i did this for a while then one day realized that my emacs.d file was huge! – Shantanu Mar 26 '12 at 12:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.