A directory titled auto-save-list
appeared in my .emacs.d
folder. In my init.el
file, I did not explicitly mention I want this folder to be made. What is the purpose of this folder? I noticed it seems to always be empty: files being auto-saved (starting with #
) appear wherever the original file being edited is, not in the auto-save-list
directory.
If you search the manual or its index for auto-save-list
you will find:
Emacs records information about interrupted sessions in files named ‘.saves-PID-HOSTNAME’ in the directory ‘~/.emacs.d/auto-save-list/’. This directory is determined by the variable ‘auto-save-list-file-prefix’. If you set ‘auto-save-list-file-prefix’ to ‘nil’, sessions are not recorded for recovery.
– C-hig (emacs)Recover
RET
I did not explicitly mention I want this folder to be made.
Emacs and elisp libraries in general write to ~/.emacs.d/
when they need to save data. That's one of the purposes of this directory -- to provide a common place for such files to be written to; and this typically happens without asking explicit permission (although it's also pretty common for you to be able to customize the filename in question if you so wish).