When typing ls
in my home directory, I amm greeted by a lot of this:
#%2Ascratch%2A#1399_po# #%2Ascratch%2A#14484YsZ# [...]
I also have the following in my init.el
(defvar autosave-location (concat user-emacs-directory "data/autosave"))
(setq auto-save-file-name-transforms
`((".*" ,autosave-location t)))
Why, then are the scratch autosaves not being sent to ~/.emacs.d/data/autosave
and instead are being blasted around my file system? Ideally, I just want it to save to that folder, however if that can't be done, disabling autosave for *scratch*
buffers entirely would suffice.
I believe this started with Emacs 24.4.
*scratch*
a file-visiting-buffer or a NON-file-visiting buffer? The default is the latter and thus is not subject to autosave. I like to kill the*scratch*
when Emacs opens and prevent it from reappearing, and instead I use a custom file-visiting-buffer called.scratch
. Whenever*scratch*
would normally appear, I preempt it with a customfind-file /path/to/.scratch
*Help*
buffer does not get autosaved, nor does a*Backtrace*
buffer.auto-save-mode
in the buffer.