Skip to content

Instantly share code, notes, and snippets.

@mattraibert
Created May 16, 2012 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattraibert/2706321 to your computer and use it in GitHub Desktop.
Save mattraibert/2706321 to your computer and use it in GitHub Desktop.
emacs autosave
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auto-save-default t)
'(auto-save-interval 20)
'(auto-save-timeout 1)
;; this doesn't actually work
'(inhibit-clash-detection t)
'(auto-save-visited-file-name t)
'(global-auto-revert-mode t))
@mattraibert
Copy link
Author

One problem is that this exposes an emacs bug where emacs fails to delete its lock files when it autosaves.
I added this line to my .profile and I run it all the time:

alias cleanmacs='find . -name ".#*" | xargs rm'

@AlexBaranosky
Copy link

Nice.!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment