additional config for autosave and backup files

This commit is contained in:
Gered 2024-12-17 18:11:05 -05:00
parent 76083bf8eb
commit bca822763d
2 changed files with 17 additions and 0 deletions

View file

@ -15,11 +15,19 @@
(setq custom-file (locate-user-emacs-file "custom.el")) (setq custom-file (locate-user-emacs-file "custom.el"))
(load custom-file :no-error-if-file-is-missing) (load custom-file :no-error-if-file-is-missing)
;; autosaves ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq auto-save-default t)
(setq auto-save-include-big-deletions t)
;; better "autosaves" file handling (the `#file#` files) ;; better "autosaves" file handling (the `#file#` files)
(setq kill-buffer-delete-auto-save-files t) (setq kill-buffer-delete-auto-save-files t)
(setq auto-save-file-name-transforms (setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t))) `((".*" ,temporary-file-directory t)))
;; backups ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq make-backup-files nil)
;; keep all *~ backup files inside ~/.emacs.d/backup ;; keep all *~ backup files inside ~/.emacs.d/backup
(defun get-emacsd-backup-file-name (fpath) (defun get-emacsd-backup-file-name (fpath)
"Return a new file path for a given file path. "Return a new file path for a given file path.
@ -32,6 +40,14 @@ If the new path's directory does not exist, this will create them."
backup-file-path)) backup-file-path))
(setopt make-backup-file-name-function 'get-emacsd-backup-file-name) (setopt make-backup-file-name-function 'get-emacsd-backup-file-name)
(setq backup-by-copying-when-linked t)
(setq backup-by-copying t)
(setq delete-old-versions t)
(setq version-control t)
(setq vc-make-backup-files nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; dumb shit because of course something fucked up like the PATH not being ;; dumb shit because of course something fucked up like the PATH not being
;; set correctly would be a thing, right? can't have this working right ;; set correctly would be a thing, right? can't have this working right
;; out-of-the-box like almost every other app .... *grumble* ;; out-of-the-box like almost every other app .... *grumble*

View file

@ -22,6 +22,7 @@
(setopt show-trailing-whitespace nil) (setopt show-trailing-whitespace nil)
(setopt indicate-buffer-boundaries 'left) (setopt indicate-buffer-boundaries 'left)
(setq confirm-nonexistent-file-or-buffer nil)
(setq use-short-answers t) (setq use-short-answers t)
(unless (display-graphic-p) (unless (display-graphic-p)