When Emacs is closed with modified buffers present, it creates a file with the format '#file_name#' for recovery purpose in its parent directory for each modified buffer (except for scratch).
When recover-file command is used when Emacs opens the next time, the previously modified buffer of the file is recovered. Even so the file #file_name# is not deleted automatically.
This would not occur if you manually kill all buffers before closing. This is a bit tedious as you would have to use the command kill-some-buffer or kill-matching buffer and say 'yes' to each of the prompts one by one.
Is there a simpler method to overcome this? It would be nice to have solutions for one or more of the following.
Prevent Emacs from creating a recovery file for modified buffer while closing
A simple command to force kill all buffers without prompt to save
Setting to re-route the recovery files to a different location (like ~/.emacs.d/)
(Versions: Emacs-24 on Ubuntu-12.04 / OS-X-10.9)
C-h i
followed bym emacs RET
followed byi auto save mode RET
. – Stefan