snippet

Keep the minibuffer's memory

Keep minibuffer history between Emacs sessions.

Savehist remembers minibuffer histories across sessions. Commands, search terms, and other entries are easier to recall with M-p instead of typing them again.

The library is named savehist, not save-hist. It is built in, so no package installation is needed.

History is written locally to savehist-file. Treat that file as personal data: do not commit it or add sensitive histories such as credentials.

(use-package savehist
  :ensure nil
  :init (savehist-mode 1))

Read the documentation

From GitHub Discussions

Read the conversation here. Posting and replies happen on GitHub.

Read-only snapshots load with JavaScript. You can also read directly on GitHub.

Discuss this page on GitHub

An independent community initiative. Not an official DNV publication.

Help & shortcuts · Search · Teams chat · Source