-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
History file gets very big #969
Comments
Better to have a config option on the amount of history to save. |
Definitely -1 on simply filtering large strings: if you select a large amount of text by accident then kill it, you can't put it back… |
@Fuuzetsu I mean filter the large strings when saving to the history file. I agree that filtering the killring while it is in memory is not be a good idea. I think a better option would be to compress the history file so that the file doesn't take much space even if somebody kills the same big text multiple times. But now I'm thinking about this more, I realize that this will probably not be a problem for normal usage of the editor. Just a warning somewhere would be enough. |
When in doubt, look at vim and emacs, what do they do with their history files? |
I just tried it in vim and it filters out large yanks from its history. I opened a large file and yanked its contents and then closed vim opened vim again and tried to paste, but nothing happened. Doing the same with small files will work as expected. I don't know what the threshold is, because I don't really know where to look for this in official documentation. Edit: |
emacs should save the killring (I think) but the undo-history is separate; I think it only stores some amount (10MB by default I think?) amount of stuff in there and if you're doing something on a big file, it plasters a big fat warning in a whole new buffer about it. |
I tested emacs by doing C-SPC -> C-n -> M-w and then close emacs and open emacs again and then tried to C-y but nothing happens. |
Oh. killring in emacs is not saved by default, sorry Seems I got confused as to what this was about. |
Due to testing killling and yanking a lot of text (600KB multiple times) my killring has grown to about 40MB. This should probably not be saved to file. Maybe we could filter very large strings or alternatively adaptively change the amount of history we save based on the size of the history.
The text was updated successfully, but these errors were encountered: