How to get EMACS to autosave to your local disk

You may want to ask your EMACS to to write autosave (crash-recovery) files to your local disk instead of writing them into AFS, which can be slow if the fileserver is busy. Since this patch disables automatic crash recovery (you have to do it yourself), you might want to wait until you're having trouble before trying it. Place the following in your .emacs, filling in a private directory and the machine it exists on:
(defvar auto-save-dir "/some local directory which others can't read/")
(if (and
     (string-match "your.machine.name" (system-name))
     (file-directory-p auto-save-dir))
    (defun make-auto-save-file-name ()
      (concat auto-save-dir "#" (buffer-name) "#")))
Thanks to David Rochbergfor this suggestion.
Dave Eckhardt
School of Computer Science
Carnegie Mellon University