I'd like to make the size of the emacs command history unlimited. I open and edit too many files in many different folders and I need a way to keep track of them. The emacs command history looks like a good place to do that. How can I do that?
I don't know if there's a command history proper, but there's a minibuffer history. The manual says the following about it:
Every argument that you enter with the minibuffer is saved in a “minibuffer history list” so you can easily use it again later.
Emacs keeps separate history lists for several different kinds of arguments. For example, there is a list for file names, used by all the commands that read file names. Other history lists include buffer names, command names (used by ‘M-x’), and command arguments (used by commands like ‘query-replace’).
The file of file names is what you want. About the length of these lists:
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.
So you can achieve that by adding the following line in you init file:
(setq history-length t)
Your original post sounds like an XY problem: you want to keep track of lots of buffers and files (the real issue), and you wonder if the command history would be a good way to do that.
Depending on your needs (hard to tell from the original post), try using: