How can I save my mini-buffer history in Emacs?

As Trey Jackson said, you want to put this:

(savehist-mode)

in your Emacs start up file, then restart Emacs. (Calling it interactively will stomp on your current mini-buffer history, so you may not want to do that.)

It’s also worth pointing out that you can persist other variables across sessions by adding them to savehist-additional-variables, like so:

(setq savehist-additional-variables '(kill-ring search-ring regexp-search-ring))

You may also want to customize savehist-file, to pick the location where Emacs saves all this stuff:

(setq savehist-file "~/.emacs.d/tmp/savehist")

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)