summaryrefslogtreecommitdiff
path: root/emacs-config.org
diff options
context:
space:
mode:
authorBlake Romero <blake@blkrom.com>2025-07-09 22:45:44 +0100
committerBlake Romero <blake@blkrom.com>2025-07-09 23:04:05 +0100
commit2fda2628e98f496566c9aadf61d3891df07a5ca8 (patch)
tree1a954c663e10012ed6e466e1163e82b149add7d2 /emacs-config.org
parent0ca84b6bd48858cdb2741e27eed77a130a1f85f4 (diff)
Enable minibuffer history
Diffstat (limited to 'emacs-config.org')
-rw-r--r--emacs-config.org29
1 files changed, 29 insertions, 0 deletions
diff --git a/emacs-config.org b/emacs-config.org
index afb4c2a..5060cc5 100644
--- a/emacs-config.org
+++ b/emacs-config.org
@@ -91,6 +91,35 @@ Enable which-key that displays a pop-up window of posisble keybindings sequences
(which-key-mode)
#+end_src
+** History
+*** Minibuffer History
+Enable saving minibuffer history.
+#+begin_src elisp
+ (savehist-mode)
+#+end_src
+
+Automatically save history on exit.
+#+begin_example elisp
+ (add-hook 'kill-emacs-hook #'savehist-save)
+#+end_example
+
+Ensure savehist file is loaded.
+#+begin_src elisp
+ (unless savehist-loaded
+ (load-file savehist-file))
+#+end_src
+
+Add addtional variable lists to save.
+#+begin_src elisp
+ (dolist (var '(command-history
+ register-alist
+ mark-ring
+ kill-ring
+ search-ring
+ regexp-search-ring))
+ (cl-pushnew var savehist-additional-variables))
+#+end_src
+
* Global Keybindings
Unlock previously unusable keybinding.
#+begin_src elisp