Questions tagged [backup]

41 questions
22
votes
3 answers

Put all backups into one backup folder

How can I set up Emacs so that all backups are placed into one backup folder? e.g. /MyEmacsBackups
programking
  • 7,194
  • 10
  • 42
  • 63
12
votes
2 answers

Turn off automatic backups for specific files

For a long time I've had Emacs put backups for all files into a single folder: (setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) I hardly ever visit the backups directory, but recently I noticed that it contains a lot of *-autoloads.el…
itsjeyd
  • 14,666
  • 3
  • 59
  • 87
4
votes
0 answers

Why is renaming (rather than copying) the default way to create backup files?

The documentation on backup file creation, Copying vs. Renaming, makes it sound like copying is the more sensible choice. file owner and group remain unchanged hard links remain associated with the actual file rather than its backup Given that,…
ivan
  • 1,948
  • 10
  • 20
2
votes
1 answer

Create versioned backup file on every save into date hierachy

New to Emacs and Lisp. I'm trying to replicate BBEdit's automatic backups, that is: create a subfolder for each day (2022-11-02) include the date and time in the backup's filename (2022-11-02 21-45-07-123) Managed to create one backup file by…
Pete
  • 31
  • 3
2
votes
1 answer

Emacs backups - why backup all files to a single directory?

I was updating my emacs backup approach using ideas from answers to this question, but I'm left unsure by one aspect, namely: the fact that several of them arrange to have backups placed in a single backup directory. So they might have something…
tkp
  • 153
  • 7
2
votes
0 answers

Keeping multiple back-ups

The below settings in my .emacs make emacs (24.3) save multiple back-ups. (setq delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t) However, I have little use for the newest 6 and oldest 2. I'd like…
P. Ajrem
  • 141
  • 3
1
vote
1 answer

How does emacs write files?

When Emacs saves a file (save-buffer, write-file etc.), does it overwrite files directly or does it create a temporary file first? More specifically, if I edit /path-to/file.txt, will Emacs directly open that file and overwrite the contents…
kdb
  • 1,561
  • 12
  • 24
0
votes
1 answer

How to prevent backup for files larger than 3MB?

One of the emacs's nice features is Backup. But is there any way to prevent backup for files larger than 3MB? Thanks!
Samira
  • 1
0
votes
0 answers

How can I make Emacs back up files right after they are saved?

I have followed this answer's solution. My goal is to back up files right after I save them. When I create a new file it is successfully backed up to the given path, but when I close and re-open Emacs the file that I was working on is not backed up…
alper
  • 1,370
  • 1
  • 13
  • 35