Reopen files that do not exist, next time. And please latest used, instead of latest opened.
-
I have several files open that are on a network drive.
If I reboot my computer, I first have to login to the network drive.
If I forget and open Notepad++, it drops the ones that are on the network drive.
Closing Notepad++, login to the network drive and reopen Notepad++ does not show the ones that where on the network drive any more.
Would be nice to have them reopened next time I start Notepad++.
Also having some files open almost continuously, does not show them after restart of Notepad++ as it is a recently opened list and not a recently used list.
Would be nice if that behavior can be changed, as it is more important to have the files that I worked on instead of the ones that are opened recently. -
Settings > Preferences > Recent Files History has a setting Don’t check at launch time , which will avoid taking non-existing files out of the recent files history (but does not affect the default session’s requirement that files exist when the session is loaded).
Regarding “recently edited” vs “recently opened”: both are incorrect interpretations of the feature. Notepad++ tracks the most recently closed files in the recent files history.
Regarding the default session: it automatically deletes files from the session that don’t exist. In the vast majority of situations, that’s what users want. Moreover, it’s the only thing that’s meaningful for automatic tracking in Notepad++.
In those less-common circumstances (like yours) where you want to remember files that might not exist next time, you need to make a manual session file rather than relying on the automatic session: some time when all the right files are open and exist, use File > Save Session… to save an “official” copy of your session. Then, if you find after a reboot that you do things in the wrong order, remind yourself to not do that again, then log into the network drive, then File > Load Session… after you’ve logged into the network drive, and the files will re-open in Notepad++.
BTW: Feature Requests in this forum are not official requests; see the FAQ for how to make official requests
-
@ibiza-fashion said in Reopen files that do not exist, next time. And please latest used, instead of latest opened.:
it drops the ones that are on the network drive
It’s a rather long-standing issue that others have had, for example, see HERE.
-
I didn’t know/remember there was already an issue regarding that. Thanks for linking it here.
So, @Ibiza-Fashion , I would put in your upvote and comments in that, so that the developers know that it’s still annoying people. Unfortunately, the volunteer developer who was showing interest in the topic last December is no longer helping with the project, so it lost any momentum that issue had last year. While waiting to see if that’s ever fixed/implemented, using a manual session is a reasonable workaround. Also, in that thread, ArkadiuszMichalski commented a couple times about a plugin that might be able to help mitigate the problem.
-
I was playing around a bit more with this, and I noticed that, somewhat surprisingly (to me at least), a Load session… command execution can actually cause a change in the session file you are trying to load.
For example, if you load a session file, and some files in that described scenario do not exist, they will be removed from the session file and that file resaved.
So, it follows that, like the default session, if you do this and you are NOT logged into your network drive (according to the OP’s described situation) at the time, you will lose track of your network files. :-(
-
@alan-kilborn said:
… they will be removed from the session file and that file resaved.
Could be interesting to follow if that “feature” was by-design or added due to another complaint.
One of my problems with Notepad++ development is that its few developers seem to attempt too much to “please the crowd” rather than keep it architected.
In my opinion, the number one goal in a good SW product (and there are so few of those) is to be predictable and not surprise its users. And that includes surprises for the good side as well.
I will not be surprised if this feature is due to some loud user that complained: “I deleted lots of files and the session warns me about them every time I open it”.
-
@alan-kilborn said in Reopen files that do not exist, next time. And please latest used, instead of latest opened.:
So, it follows that, like the default session, if you do this and you are NOT logged into your network drive (according to the OP’s described situation) at the time, you will lose track of your network files. :-(
I did try another test, where I made the session file read-only (per the file system). In this case, temporary unavailability of a file did NOT cause the file to be forgotten. So this could be a workaround, I suppose.