Whenever I edit files on emacs, it seems a temporary file is created with the same name with ~ appended to it. Does anyone know an quick/easy way to delete all of these files in the working directory?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While all the others answers here correctly explain how to remove the files, you ought to understand what’s going on. Those files ending in ~ are backup files, automatically created by Emacs. They can be useful sometimes. If you’re annoyed by the files and want to delete them every time, then you either
(1). prevent the creation of backup files:
or
(2). Have it save the backup files in some other directory, where they won’t bother you unless you go looking for them. I have the following in my .emacs:
(Only the first line is crucial.) To see documentation about
backup-directory-alist, type C-h v backup-directory-alist.