Remove kill-ring from savehist-additional-variables because certain characters cause savehist to fail.

This commit is contained in:
James Cherti
2026-02-15 13:27:24 -05:00
parent 00ac669d9c
commit edf8b4562a
2 changed files with 21 additions and 26 deletions

View File

@@ -299,12 +299,12 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already
:commands (auto-revert-mode global-auto-revert-mode) :commands (auto-revert-mode global-auto-revert-mode)
:hook :hook
(after-init . global-auto-revert-mode) (after-init . global-auto-revert-mode)
:custom :init
(auto-revert-interval 3) (setq auto-revert-interval 3)
(auto-revert-remote-files nil) (setq auto-revert-remote-files nil)
(auto-revert-use-notify t) (setq auto-revert-use-notify t)
(auto-revert-avoid-polling nil) (setq auto-revert-avoid-polling nil)
(auto-revert-verbose t)) (setq auto-revert-verbose t))
;; Recentf is an Emacs package that maintains a list of recently ;; Recentf is an Emacs package that maintains a list of recently
;; accessed files, making it easier to reopen files you have worked on ;; accessed files, making it easier to reopen files you have worked on
@@ -315,9 +315,9 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already
:hook :hook
(after-init . recentf-mode) (after-init . recentf-mode)
:custom :init
(recentf-auto-cleanup (if (daemonp) 300 'never)) (setq recentf-auto-cleanup (if (daemonp) 300 'never))
(recentf-exclude (setq recentf-exclude
(list "\\.tar$" "\\.tbz2$" "\\.tbz$" "\\.tgz$" "\\.bz2$" (list "\\.tar$" "\\.tbz2$" "\\.tbz$" "\\.tgz$" "\\.bz2$"
"\\.bz$" "\\.gz$" "\\.gzip$" "\\.xz$" "\\.zip$" "\\.bz$" "\\.gz$" "\\.gzip$" "\\.xz$" "\\.zip$"
"\\.7z$" "\\.rar$" "\\.7z$" "\\.rar$"
@@ -341,13 +341,9 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already
:commands (savehist-mode savehist-save) :commands (savehist-mode savehist-save)
:hook :hook
(after-init . savehist-mode) (after-init . savehist-mode)
:custom :init
(savehist-autosave-interval 600) (setq history-length 300)
(savehist-additional-variables (setq savehist-autosave-interval 600))
'(kill-ring ; clipboard
register-alist ; macros
mark-ring global-mark-ring ; marks
search-ring regexp-search-ring)))
;; save-place-mode enables Emacs to remember the last location within a file ;; save-place-mode enables Emacs to remember the last location within a file
;; upon reopening. This feature is particularly beneficial for resuming work at ;; upon reopening. This feature is particularly beneficial for resuming work at
@@ -357,8 +353,8 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already
:commands (save-place-mode save-place-local-mode) :commands (save-place-mode save-place-local-mode)
:hook :hook
(after-init . save-place-mode) (after-init . save-place-mode)
:custom :init
(save-place-limit 400)) (setq save-place-limit 400))
``` ```
### Activating autosave ### Activating autosave

View File

@@ -245,8 +245,7 @@
(setq history-length 300) (setq history-length 300)
(setq savehist-save-minibuffer-history t) ;; Default (setq savehist-save-minibuffer-history t) ;; Default
(setq savehist-additional-variables (setq savehist-additional-variables
'(kill-ring ; clipboard '(register-alist ; macros
register-alist ; macros
mark-ring global-mark-ring ; marks mark-ring global-mark-ring ; marks
search-ring regexp-search-ring)) ; searches search-ring regexp-search-ring)) ; searches