Disable auto-save and document it in README.md

This commit is contained in:
James Cherti
2025-03-06 07:54:14 -05:00
parent 5a8fae4522
commit 944c74ef6a
2 changed files with 14 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ The author uses *minimal-emacs.d* as his `early-init.el` and `init.el`, alongsid
- [How to prevent minimal-emacs.d from saving custom.el?](#how-to-prevent-minimal-emacsd-from-saving-customel) - [How to prevent minimal-emacs.d from saving custom.el?](#how-to-prevent-minimal-emacsd-from-saving-customel)
- [Optimization: Native Compilation](#optimization-native-compilation) - [Optimization: Native Compilation](#optimization-native-compilation)
- [How to activate recentf, savehist, saveplace, and auto-revert?](#how-to-activate-recentf-savehist-saveplace-and-auto-revert) - [How to activate recentf, savehist, saveplace, and auto-revert?](#how-to-activate-recentf-savehist-saveplace-and-auto-revert)
- [Activating autosave](#activating-autosave)
- [Code completion with corfu](#code-completion-with-corfu) - [Code completion with corfu](#code-completion-with-corfu)
- [Configuring Vertico, Consult, and Embark](#configuring-vertico-consult-and-embark) - [Configuring Vertico, Consult, and Embark](#configuring-vertico-consult-and-embark)
- [Code Folding](#code-folding) - [Code Folding](#code-folding)
@@ -208,6 +209,18 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already
(add-hook 'after-init-hook #'save-place-mode) (add-hook 'after-init-hook #'save-place-mode)
``` ```
### Activating autosave
Auto-save helps prevent data loss in case of crashes. You can restore auto-saved data using the `recover-file` or `recover-session` functions.
To enable autosave, add the following to `~/.emacs.d/post-init.el`:
```emacs-lisp
;; Enable auto-save to prevent data loss. Use `recover-file` or
;; `recover-session` to restore unsaved changes.
(setq auto-save-default t)
```
### Code completion with corfu ### Code completion with corfu
Corfu enhances in-buffer completion by displaying a compact popup with current candidates, positioned either below or above the point. Candidates can be selected by navigating up or down. Corfu enhances in-buffer completion by displaying a compact popup with current candidates, positioned either below or above the point. Candidates can be selected by navigating up or down.

View File

@@ -181,7 +181,7 @@
;; Enable auto-save to safeguard against crashes or data loss. The ;; Enable auto-save to safeguard against crashes or data loss. The
;; `recover-file' or `recover-session' functions can be used to restore ;; `recover-file' or `recover-session' functions can be used to restore
;; auto-saved data. ;; auto-saved data.
(setq auto-save-default t) (setq auto-save-default nil)
(setq auto-save-no-message t) (setq auto-save-no-message t)
;; Do not auto-disable auto-save after deleting large chunks of ;; Do not auto-disable auto-save after deleting large chunks of