Emacs 2013 Auto Save File Problem (before Emacs 26 (2018-06))

By Xah Lee. Date: .

This page is archived, here for historical reasons.

Year 2013, Emacs Auto Save File Problem (before Emacs 26 (2018-06))

You can set emacs to auto save files directly, instead of creating those #filename#.

Put this in your Emacs Init File:

(setq auto-save-default t)
(setq auto-save-visited-file-name t)

Problems

However, this does not work well. Emacs still generates those #files#, this time, named like this:

.#xxtemp.201601134145.44920.el -> xah@xah-p6813w.21261:1452244010

If you have scripts going thru your machine, you get this error:

error: cannot open /home/john/web/.#vocabulary.html No such file or directory

There are probably ways to fix this, with hooks or timer, but i haven't looked into.

thanks to Fuqiao Xue (xfq) https://github.com/xfq/ and finalpatch [[2013-08-20 http://www.weibo.com/u/1885517634 ]]

thanks to http://irreal.org/blog/?p=4867, Anna Pawlicka (@AnnaPawlicka)