fixup auto saves / auto backups
This commit is contained in:
parent
c3baeecc2d
commit
01b7811a8b
|
@ -13,6 +13,24 @@
|
||||||
(setq kmn/is-termux
|
(setq kmn/is-termux
|
||||||
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
(string-suffix-p "Android" (string-trim (shell-command-to-string "uname -a"))))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; backups
|
||||||
|
(defconst kmn/backup-dir
|
||||||
|
(expand-file-name "backups/" user-emacs-directory))
|
||||||
|
(unless (file-exists-p kmn/backup-dir)
|
||||||
|
(make-directory kmn/backup-dir))
|
||||||
|
(setq backup-directory-alist `((".*" . ,kmn/backup-dir)))
|
||||||
|
(setq auto-save-list-file-prefix kmn/backup-dir)
|
||||||
|
(setq auto-save-file-name-transforms
|
||||||
|
`(("\\(?:[^/]*/\\)*\\(.*\\)" ,(concat kmn/backup-dir "\\1") t)))
|
||||||
|
(setq backup-by-copying t) ; safest form of backup file creation
|
||||||
|
; Config backups so we have *more*, not less
|
||||||
|
(setq delete-old-versions t
|
||||||
|
kept-new-versions 1
|
||||||
|
kept-old-versions 3
|
||||||
|
version-control t
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; dired adjustments
|
; dired adjustments
|
||||||
(use-package dired-rainbow
|
(use-package dired-rainbow
|
||||||
|
@ -210,19 +228,6 @@
|
||||||
(set-language-environment "UTF-8")
|
(set-language-environment "UTF-8")
|
||||||
(set-default-coding-systems 'utf-8-unix)
|
(set-default-coding-systems 'utf-8-unix)
|
||||||
|
|
||||||
; backups
|
|
||||||
(defconst kmn/backup-dir
|
|
||||||
(expand-file-name "backups" user-emacs-directory))
|
|
||||||
(unless (file-exists-p kmn/backup-dir)
|
|
||||||
(make-directory kmn/backup-dir))
|
|
||||||
(setq backup-directory-alist `((kmn/backup-dir)))
|
|
||||||
(setq backup-by-copying t) ; safest form of backup file creation
|
|
||||||
; Config backups so we have *more*, not less
|
|
||||||
(setq delete-old-versions t
|
|
||||||
kept-new-versions 1
|
|
||||||
kept-old-versions 3
|
|
||||||
version-control t
|
|
||||||
)
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; set font for emoji -- DOES NOT WORK ON MOBILE
|
;; set font for emoji -- DOES NOT WORK ON MOBILE
|
||||||
(when (eq system-type 'windows-nt)
|
(when (eq system-type 'windows-nt)
|
||||||
|
|
Reference in a new issue