reddit / emacs

How to cache most recently used command (M-x)

RepublicWorried · 2022-10-27 10:24
I used to use ido with amx package. Now I switched to fido-vertical (which apparently includes icomplete under the hood). Amx however does not seem to work here. What is the native way to have this kind of functionality with icomplete? And for that matter, how does your fido config look like? Its hard to find examples on the internet
DPaluche · 2022-10-27 14:08
Do you want M-x M-p?
RepublicWorried · 2022-10-27 16:24
what do you mean by that?
DPaluche · 2022-10-27 16:33
By caching the most recently used command, I think you mean that you want to easily repeat the last M-x call that you did, and M-p does that. I have never heard of amx or fido fwiw.
RepublicWorried · 2022-10-28 18:40
but this does not persist across emacs restars, does it?
DPaluche · 2022-10-28 18:57
No. I don’t know how to do that.
7890yuiop · 2022-10-29 06:45
You can persist all minibuffer histories with this: (savehist-mode 1)
7890yuiop · 2022-10-29 06:48
n.b. If your question is how to make something "persist across emacs restarts" it would help if you actually asked that.
RepublicWorried · 2022-10-29 07:12
true =/