1

I have placed my autosave and backup files in a single directory .emacs-saves.

Backup files appear as ~foo

Autosave files appear as #foo#

But Emacs seems to also generate .#foo in the current directory whenever a change is made in a buffer.

What's the purpose of these files and is there a way to specify their default directory?

Drew
  • 75,699
  • 9
  • 109
  • 225
Rtsne42
  • 489
  • 5
  • 13

1 Answers1

1

These are lock files. See Save lock-files to a directory instead of disabling them

If you are accessing files remotely (think tramp or nfs) then it is a lot simpler to have the lock files in the same directory as the file being edited.

icarus
  • 1,904
  • 1
  • 10
  • 15
  • Thanks, what is the purpose of the lock files? Is it just to prevent other applications opening these files while they are being edited or are there other reasons for these files? – Rtsne42 Jan 03 '17 at 08:51
  • Actually, nevermind, found the answer here https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html – Rtsne42 Jan 03 '17 at 08:54