Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 55111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:19:34+00:00 2026-05-10T17:19:34+00:00

Emacs puts backup files named foo~ everywhere and I don’t like having to remember

  • 0

Emacs puts backup files named foo~ everywhere and I don’t like having to remember to delete them. Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I’m done editing, and that’s confusing and awful. How can I either eliminate these backup files, or have them go somewhere other than the same directory?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:19:35+00:00Added an answer on May 10, 2026 at 5:19 pm

    If you’ve ever been saved by an Emacs backup file, you probably want more of them, not less of them. It is annoying that they go in the same directory as the file you’re editing, but that is easy to change. You can make all backup files go into a directory by putting something like the following in your .emacs.

    (setq backup-directory-alist `(('.' . '~/.saves'))) 

    There are a number of arcane details associated with how Emacs might create your backup files. Should it rename the original and write out the edited buffer? What if the original is linked? In general, the safest but slowest bet is to always make backups by copying.

    (setq backup-by-copying t) 

    If that’s too slow for some reason you might also have a look at backup-by-copying-when-linked.

    Since your backups are all in their own place now, you might want more of them, rather than less of them. Have a look at the Emacs documentation for these variables (with C-h v).

    (setq delete-old-versions t   kept-new-versions 6   kept-old-versions 2   version-control t) 

    Finally, if you absolutely must have no backup files:

    (setq make-backup-files nil) 

    It makes me sick to think of it though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As much as I like to remember as many keyboard shortcuts as possible, there's
Emacs has a useful transpose-words command which lets one exchange the word before the
Emacs edits my .emacs file whenever I use the customization facility, or when I
Emacs does not recognize my correct Python path. I think it is a general
Emacs has Paredit which actively prevents you from typing unbalanced parentheses (short of C-Q
In emacs, I've read the following code snippet in simple.el : (frame-parameter frame 'buried-buffer-list)
In Emacs, C-x o takes me to the next window. What keyboard macro takes
Can Emacs support the concept of projects? That would be where several configuration options
The Emacs cperl-mode seems to get confused less than perl-mode, but the Skittles effect
The Emacs Wiki lists several modes for supporting mercurial inside of Emacs, including the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.