Skip to content

Minibuffer histories

Denote has a dedicated minibuffer history for each one of its prompts. This practically means that using ‘M-p’ (previous-history-element) and ‘M-n’ (next-history-element) will only cycle through the relevant record of inputs, such as your latest titles in the ‘TITLE’ prompt, and keywords in the ‘KEYWORDS’ prompt.

The built-in ‘savehist’ library saves minibuffer histories. Sample configuration:

emacs-lisp
(require 'savehist)
(setq savehist-file (locate-user-emacs-file "savehist"))
(setq history-length 500)
(setq history-delete-duplicates t)
(setq savehist-save-minibuffer-history t)
(add-hook 'after-init-hook #'savehist-mode)