I’d like to save, for instance, my find-file and Meta-X history in Emacs’ mini-buffer so I can recall commands later in a different session.
I’d like to save, for instance, my find-file and Meta-X history in Emacs’ mini-buffer
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Trey Jackson said, you want to put this:
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:You may also want to customize
savehist-file, to pick the location where Emacs saves all this stuff: