Disable auto-save and document it in README.md
This commit is contained in:
13
README.md
13
README.md
@@ -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.
|
||||||
|
|||||||
2
init.el
2
init.el
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user