This repo is archived and moved to yyelpa/tetosave, see: https://github.com/yyelpa/tetosave
- No need to save manually, protect your fingers.
- Cleanup trailing backspace
This package is folked from lazycat’s auto-save, plus some improvements(IMO).
Clone or download this repository, and add its path to load-path
:
(add-to-list 'load-path <path-to-tetosave>)
If you are using Emacs 29 or above, you can use package-vc
to get it like this(without need to add load-path
)
(add-to-list 'package-vc-selected-packages
'(tetosave :url "https://github.com/include-yy/tetosave"))
(package-vc-install-selected-packages)
In your config file, add the following lines:
(use-package tetosave
:config
(setopt tetosave-idle 0.5)
(tetosave-enable)
;; OPTIONAL
;; custom predicates if you don't want auto save.
;; example: disable tetosave when current filetype is an gpg file.
(add-to-list 'tetosave-disable-predicates
(defun init/teto-pred-gpg ()
(eq major-mode 'authinfo-mode))))
For more detailed customization, see comments in tetosave.el
.
Emacs’ default auto-save is stupid to generate #foo# files. You can add these lines to disable them:
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq create-lockfiles nil)