Niklas Köhler
Niklas Köhler

Reputation: 95

How do I store a persistent history?

Im fairly new to Emacs (I'm using emacs now since 1 month) and migrated from vim. One "feature" of vim I really miss in Emacs, is the persistent history.

When I am starting vim I can easily open files I recently had open via the command history. But in Emacs when im in dired (or executing commands via M-x) and then pressing M-p I can only browse through the sessions history, and cannot open i.e. files I had opened in a previous session. So, now my question: Is it possible to store the Emacs-history persistent on my system, that when I re-open Emacs I can access my complete history? (Btw. my Emacs Version is 24.3.1)

Thanks in regards, Niklas

Upvotes: 4

Views: 1060

Answers (2)

user355252
user355252

Reputation:

For M-x specifically, look at the SMex package. It enhances M-x with a history, flex matching, better ordering, etc.

Upvotes: 1

Trudbert
Trudbert

Reputation: 3188

You can put (savehist-mode 1) in your .emacs to save your minibuffer history over several sessions. (You will need to restart for this to work)

Upvotes: 6

Related Questions