@hixcube said:
Thanks for checking timestamps and permissions. Unfortunately, I very specifically said session.xml, and you reported the information for config.xml, which is a separate file. However, it is promising that config.xml was written properly, because if it has write-permission on config.xml, then it probably also has write permission on session.xml
I launched Notepad++ again; all tabs were closed (strangely enough). I opened three tabs.
I reopened Notepad++ and found the three tabs I had just opened. I closed one of them, then closed Notepad++.
So far, everything is working as expected (after the “strangely enough”, which I cannot explain, because I don’t know what actions you had taken before that point)
I checked the properties for the file C:\Users\MyUser\AppData\Roaming\Notepad++\config.xml and noticed a time difference compared to the previous version of config.xml:
which indicates that config.xml is writable, and being updated (as it should be). But, unfortunately, the list of files is stored in session.xml, so that’s not the right file to be looking at.
Try closing the application using “File > Exit” after removing the tabs, then check whether the files remain closed the next time you launch it. In Notepad++ v8.9.8.1 (64-bit), I do not see the option “Exit after closing tabs”—only “Exit” is available.
You mis-interpreted @danielcollins’s statement of “Try closing with File > Exit after removing the tabs”. It was meant to indicate use "File > Exit" after closing one or more of your tabs, not Try closing with "File > Exit after removing the tabs".
And your experiment trailed off at this point. You forgot to do my step “7”, where you look one last time, to see if it remembered that you closed the file. That’s the thing that would answer whether or not Notepad++ was working right or not now.
Since you started with no files open, added three, and then after the next exit/restart of Notepad++, it still had all three files open, it sure looks like session.xml was working right. But that one last step-7 check was needed to make sure it was properly tracking you closing files as well. I believe it would have, but you didn’t tell us, which makes it hard to continue to help you.
However, on one occasion, an option like “Clear list of recent files” (or something similar) appeared, but it has not reappeared since - even after opening and saving files.
Near the bottom of the File menu in Notepad++ is Empty Recent Files List
[image: 1795362904617-bc99f7b2-804c-422b-9b37-c43afaab267a-image.jpeg]
… which will clear out the list above it.
However, if you have Settings > Preferences > Recent Files History set to ☑ In Submenu, then instead it will be in a Recent Files sub-menu, with the Empty Recent Files List going before the list of recent files, instead of after it:
[image: 1795363045891-42e514ca-cd19-4386-bd6b-36ec7f96b62c-image.jpeg]
I will perform a complete (“deep”) uninstallation of Notepad++ using either Revo Uninstaller Pro or Bulk Crap Uninstaller, and then reinstall it.
Why in the world would you do that? We hadn’t finished debugging your problem: there were steps we had asked you to take that you hadn’t reported back on, and your answers may have informed further steps. Plus, if those tools (whatever they are) don’t reset the AppData files as well, then they would likely do nothing for your difficulty, other than waste your time. Now, instead, everything will be reset to some completely unknown state. If it works for you, great, but if not, you’ve made it harder for us to help you debug.