When I used Doom Emacs on Pop OS I didn't have any problems with recent files being saved. That was just done by default and I didn't have to change anything in my config for this. However after switching to Arch and installing Doom Emacs I have experienced these issues. Interestingly enough it seems like the issue isn't just that the list isn't saved, because when rebooting my PC it does seem to often retain the list from my previous session, where it only sometimes clears it out.
Running doom doctor doesn't list anything obvious being wrong. The only thing I get are warnings related to different
:lang options I have in my config, and also :tools lsp, which I believe is irrelevant.Sadly I don't really know much of what I'm doing. I attempted searching for a solution using an LLM, however none of the answers solved the problem. Having also experienced how roundabout the LLM's solutions can be compared to the ones given from here by actual people, I also can't trust that the solution it gives isn't extremely hacky and bad. What I have tried is adding the following to my config.el:
(after! recentf
(run-at-time 600 600 #'recentf-save-list))
This did save the file, however I still found it reset occasionally. After that I tried replacing it will the following, however that didn't work either.
(setq recentf-max-saved-items 500
recentf-auto-cleanup 'never)
(after! recentf
(recentf-mode 1))
If you need to see any other parts of my config then you can find it here. Note however that the most recent commit in this repo contains the first method that I showed in this post at the bottom of config.el which didn't work.
Please tell me if any other information needs to be provided and I'll make sure to give it!
https://redd.it/1x8fow7
@r_emacs