Update CLI settings, auto-save, and backup
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
The **minimal-emacs.d** project is a **fast and lightweight** minimal Emacs starter kit (`init.el` and `early-init.el`) that **gives you full control over your configuration**. It provides better defaults, an optimized startup, and a clean foundation for building your own vanilla Emacs setup.
|
||||
|
||||
In just a few minutes of applying what's in this README.md file, you will have a fully functional, high-performance Emacs configuration ready for work. You will bypass hours of configuration and the heavy overhead of frameworks like Doom or Spacemacs, gaining access to optimized garbage collection, sensible UI defaults, and a fast startup.
|
||||
In just a few minutes of applying what's in this README.md file, you will have a fully functional, high-performance Emacs configuration ready for work. You will bypass hours of configuration and the heavy overhead of frameworks like Doom or Spacemacs, gaining access to optimized garbage collection, sensible defaults, and a fast startup.
|
||||
|
||||
If this helps your workflow, please show your support by **⭐ starring minimal-emacs.d on GitHub** to help more Emacs users discover its benefits.
|
||||
|
||||
|
||||
18
init.el
18
init.el
@@ -197,8 +197,16 @@
|
||||
|
||||
;;; Backup files
|
||||
|
||||
;; Avoid backups or lockfiles to prevent creating world-readable copies of files
|
||||
;; Disable the creation of lockfiles (e.g., .#filename).
|
||||
;; Modern workflows rely on `global-auto-revert-mode' to handle external file
|
||||
;; changes gracefully, making the restrictive nature of lockfiles unnecessary.
|
||||
(setq create-lockfiles nil)
|
||||
|
||||
;; Disable backup files (e.g., filename~). Note that `auto-save-default'
|
||||
;; remains enabled by default. Even with `make-backup-files' backups disabled,
|
||||
;; Emacs will still generate temporary recovery files (e.g., #filename#) for
|
||||
;; unsaved buffers. This protects your active work from sudden crashes while
|
||||
;; ensuring the file system is cleaned up immediately upon a successful save.
|
||||
(setq make-backup-files nil)
|
||||
|
||||
(setq backup-directory-alist
|
||||
@@ -214,7 +222,6 @@
|
||||
;;; VC
|
||||
|
||||
(setq vc-git-print-log-follow t)
|
||||
(setq vc-make-backup-files nil) ; Do not backup version controlled files
|
||||
(setq vc-git-diff-switches '("--histogram")) ; Faster algorithm for diffing.
|
||||
|
||||
;;; Auto save
|
||||
@@ -222,9 +229,14 @@
|
||||
;; Enable auto-save to safeguard against crashes or data loss. The
|
||||
;; `recover-file' or `recover-session' functions can be used to restore
|
||||
;; auto-saved data.
|
||||
(setq auto-save-default nil)
|
||||
(setq auto-save-default t)
|
||||
(setq auto-save-no-message t)
|
||||
|
||||
(when noninteractive
|
||||
;; The command line interface
|
||||
(setq enable-dir-local-variables nil)
|
||||
(setq case-fold-search nil))
|
||||
|
||||
;; Do not auto-disable auto-save after deleting large chunks of
|
||||
;; text.
|
||||
(setq auto-save-include-big-deletions t)
|
||||
|
||||
Reference in New Issue
Block a user