How to show all of minibuffer commands history in Emacs?

1.6k Views Asked by At

I see I can go back history of command by using "M-p" in minibuffer. But I want to see all of command I used in minibuffer.

Thanks.

4

There are 4 best solutions below

0
On

If you use Helm, then it would be:

(define-key minibuffer-local-map (kbd "C-c C-l") 'helm-minibuffer-history)

The equvalent version of selectrum + consult:

(define-key minibuffer-local-map (kbd "C-c C-l") 'consult-history)
0
On

This explains how to repeat the n-th previous command and how to view history:

M-x list-command-history

Display the entire command history, showing all the commands C-x <ESC> <ESC> can repeat, most recent first.

And according to this you can set the maximum length of the minibuffer history:

The variable history-length specifies the maximum length of a minibuffer history list; adding a new element deletes the oldest element if the list gets too long. If the value is t, there is no maximum length.

4
On

It's held in minibuffer-history variable. For a graphical view, use helm-minibuffer-history from helm package.

0
On

The variable is command-history, not minibuffer-history.

You can use M-x list-command-history. Just customize option list-command-history-max, if you want to see the whole history.

Or look directly at variable command-history using C-h v. But see option history-length, which controls how many commands to keep in command-history.