title: How to remove the temporary files starting and ending with '#' created by Emacs when it closes?
body: <p>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).</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Is there a simpler method to overcome this? It would be nice to have solutions for one or more of the following.</p>
  
  <ul>
  <li><p>Prevent Emacs from creating a recovery file for modified buffer while closing</p></li>
  <li><p>A simple command to force kill all buffers without prompt to save</p></li>
  <li><p>Setting to re-route the recovery files to a different location (like ~/.emacs.d/)</p></li>
  </ul>
  
  <p>(Versions: Emacs-24 on Ubuntu-12.04 / OS-X-10.9)</p>