Unsaved Files Recovery Script
-
Thank you for pointing me toward the FAQ. I’ll take a look at that to better understand how decision-making around Notepad++ development actually works.
That said, I do appreciate that some of you have contributed to the codebase, and I’d like to move the discussion in a more constructive direction. My intent was never to debate the merits of personal backup habits—though that discussion seems to have taken on a life of its own. Instead, my goal has been to explore what’s technically feasible in addressing a recurring user issue: unexpected data loss due to reliance on session persistence.
I now understand that Don is the sole decision-maker and doesn’t actively engage in discussions like these. Given that, I’d like to ask those of you who do have experience with the Notepad++ codebase:
- If this issue were to be addressed at the development level, what would be the biggest technical challenges in implementing a safeguard?
- Are there existing constraints within the codebase that make solutions like a pre-update warning, automatic session validation, or improved backup handling impractical?
- Have there been previous discussions or proposals around this, and if so, what were the outcomes?
If the answer is that it’s just not a priority, that’s fine—I just want to understand the technical reasoning rather than continuing in circles about user habits. If there’s a more appropriate channel where technical feasibility is discussed (GitHub issues, a dev mailing list, etc.), I’d be happy to take the conversation there instead.
Ultimately, I’d rather focus on what can be done rather than rehashing why it shouldn’t be done. Thanks in advance to anyone willing to engage in a more technical discussion.
-
@Private-Confidential said in Unsaved Files Recovery Script:
1️⃣ This isn’t about laziness—it’s about expectations.
Users have been trained to trust that Notepad++ will restore their unsaved work, because that’s how the feature has always behaved. When an update wipes that work out without warning, it’s not just a bad habit issue—it’s a design failure. If a feature creates an expectation, the developers should either ensure it works reliably or warn users explicitly when it might fail.
I understand your points, but I fear you do not understand mine. This first statement of yours, is where the logic of your entire premise fails.
They haven’t been trained, or else they would know that you need to backup unsaved work by saving it. This feature was never meant to be used in perpetuity for an unsaved document to be safe. That is the reality, and the weakness in your premise.
Also where your premise dies, is in the
..If a feature creates an expectation...
because the feature never created that expectation. The user not saving their work and they themselves depending on it, created that expectation. If I use a hammer to remove screws, they don’t come out. You can not demand a tool not designed for one job to work for another. The premise is ludicrous, and that’s what I’m getting at. If the user is not qualified to use the tool right, then the safest thing to do, is to take that tool away from that user, until they learn why the tool exists and how to use it properly.That’s why I pointed out that, your argument
will have to evolve off of the prevent people from being lazy, forgetful (which the feature acutally helps) or complacent.
It’s where the reason for your solution, or this discussion or need for the developers to get involved, loses any credibility. It is, in current parlance, ananny-state
solution to a problem that doesn’t truly exist. Rather it is created by a negligent behavior problem. You do not reward negligent behavior, to correct it. You allow the practicing negligent to continue until theyget it
.Anyway, I believe you’ve been directed to the proper area for this discussion to continue to be entertained on github, in the development ecosystem where you can make your complaint, suggestions, and discussions flow…because as @PeterJones points out, this is not the place to argue your case for action. It’s a nice place for discussion, but hardly the place for actionable results. Good luck in your quest.
-
@Private-Confidential - I believe the most common reason for “lost files” is that someone reinstalls or updates Notepad++ and then posts the horror story titled “my files are gone!” Another common cause seems to be people working in enterprise environments and their roaming desktop profiles get mangled.
The enterprise issue is particularly challenging because people get randomly assigned virtual desktop sessions every they sign in. We can’t 100% depend on the contents of APPDATA, LOCALAPPDATA, or ProgramData being there tomorrow.
Thus, while your script is laudable it likely will not work in many “my files are gone!” situations as the script makes the assumption that the currently installed copy of Notepad++ exactly matches how Notepad++ was installed and configured yesterday or some vague time ago.
-
@Lycan-Thrope said in Unsaved Files Recovery Script:
They haven’t been trained, or else they would know that you need to backup unsaved work by saving it.
FWIW, I think you’ve misunderstood what @Private-Confidential meant by “trained” in this context:
By enabling the unsaved files feature by default, many (most?) NP++ users have learned to expect unsaved work to be restored when NP++ is reopened, even when things like system restarts and software updates occur between NP++ sessions.
Admittedly, many (most?) users were likely surprised by this dynamic because it goes against the logic of just about every other file-based software program ever created. In fact, one could even argue that many (most?) users discovered this dynamic accidentally because they weren’t expecting it at first. Either way, it’s a default feature that many (most?) NP++ users are at least aware of by now, whether they consciously make use of it or not. Furthermore, the fact that it’s an intentionally-designed feature makes it reasonable to accept the functionality as an expectation, even if it technically isn’t wise to rely on this expectation.
That said, it’s also reasonable to accept that any issues with (or breakdowns in) this functionality are deficiencies that are at least worthy of investigation, even if the investigations aren’t a high priority. Obviously, if it is established that these deficiencies could be addressed somehow, the question of whether or not they should be addressed depends on a number of factors, including how many users actually want the issue addressed, the complexity of the resolution (for both end users and developers), etc.
-
@mathlete2 said in Unsaved Files Recovery Script:
FWIW, I think you’ve misunderstood what @Private-Confidential meant by “trained” in this context:
By enabling the unsaved files feature by default, many (most?) NP++ users have learned to expect unsaved work to be restored when NP++ is reopened, even when things like system restarts and software updates occur between NP++ sessions.
No @mathlete2 , I completely understand what he meant, and my response is still valid. No one trained those users, but themselves. The very nature, name and purpose of
Session
does not mislead anyone with any familiarity with the English language.The Session is a snapshot of the desktop before closing, it is not a backup option. If all files are properly saved, and a user closes and then reopens the program, their Session is exactly like they left it. Line and column locations of files, files that were open…etc. The ability of a document that is unsaved being retained in that Session snapshot is not it’s purpose, and no amount of logic by people that make themselves dependent on that as a feature can be justified in the overall continued reminder by all software (even NPP) to save your files/data before closing, changing, updating or reinstalling…etc. It is the stable traning mantra, if ever there were any training in this regard, to save data. So whether by accident or circumstance an unintended benefit of a feature, justifies someone ignoring the overriding mantra to save data/files. It is not a program’s job, as I’ve said, to save a user from themselves. It is the purview of deities. :-)
-
@Lycan-Thrope said in Unsaved Files Recovery Script:
So whether by accident or circumstance an unintended benefit of a feature, justifies someone ignoring the overriding mantra to save data/files.
This should have been:
So whether by accident or circumstance, an unintended benefit of a feature, does not justify someone ignoring the overriding mantra to save data/files. -
@Lycan-Thrope said in Unsaved Files Recovery Script:
I completely understand what he meant, and my response is still valid
That first part does not appear to be true: @Private-Confidential 's original comment began with “Users have been trained to trust that Notepad++ will restore their unsaved work”, and you responded with “They haven’t been trained”. The original comment was referring to the informal “training” that occurs as a result of observant usage of NP++ (and reading the online documentation). Such usage and reading teaches you that, in most cases, the default settings of NP++ will preserve the content within unsaved files.
This “training”, while admittedly incomplete with respect to the overall functionality of the feature at hand, has undeniably occurred. Had you responded with something like “they haven’t been fully trained”, your claim would have been valid. However, as it stands, you either referred to a different type of training than what was originally implied, or incorrectly dismissed the training that has occurred.
It’s also worth pointing out that this “training” provides users with correct information about how NP++ is designed to work (at least in most situations), and does not contradict the additional information you have provided. Specifically: your point that the session snapshot feature is not designed to function as a backup (which is valid) does not change the fact that users can reasonably expect their sessions to be restored in most situations, nor does it imply that improvements to this feature (or the implementation of additional features to support it) are unreasonable/unnecessary/useless/etc.
The same can be said of your clarification that “No one trained those users, but themselves”: this is a true statement, but it doesn’t go against any of the points that @Private-Confidential is making. If anything, this observation highlights the point that they were trying to make with the original “training” comment: there is no formal training available for NP++ users, so their initial understanding will almost always be based on things like trial-and-error. Even users who go a step further and read the documentation won’t necessarily learn some of the key subtleties that you are pointing out; these subtleties are certainly consistent with the documentation, but they are not implied by the documentation - that in itself is a key subtlety that’s worth noting.
TLDR: the main point that I was trying to make was that you are both raising valid points that do not necessarily contradict one another. At the very least, your ideas are not as incompatible with @Private-Confidential 's as you seem to think.
-
@mathlete2 ,
We’ll just have to agree to disagree. To state it plainly, no one trained those users to trust Notepad++ to do any such thing.They assumed, it would do it…and in perpetuity. That is immature and irresponsible behavior for someone to then need saving from themselves when any training ever given, or written for using programs always starts with the mantra to save one’s work. I was trying to be diplomatic about it using his own words, but your dissection has left me needing to state in plain language. The longer this discussion goes on, the more I think @Alan-Kilborn has a good point, to make the Session Backup not a default setting so people aren’t mistakenly
trained
( and assumes) the behavior is perpetually going to save them from themselves. -
@Lycan-Thrope said in Unsaved Files Recovery Script:
To state it plainly, no one trained those users to trust Notepad++ to do any such thing.
We agree on that, but that’s not the point that @Private-Confidential and I are making; you don’t need someone to explicitly teach you something to be trained to do something.
The training we are referring to is coming from standard usage of NP++: users are observing that, if they don’t explicitly close an unsaved file before closing NP++ itself, the content will be restored the next time NP++ is opened in the vast majority of situations (including system restarts and updates, and even NP++ updates). As you alluded to, this inadvertently lulls some users into a false sense of security; that’s the “training” we are referring to. Are these users a bit short-sighted for thinking this way? Perhaps. However, given how often it does work, it’s not difficult to understand why so many users over-estimate the effectiveness of this feature.
@Lycan-Thrope said in Unsaved Files Recovery Script:
I think @Alan-Kilborn has a good point, to make the Session Backup not a default setting so people aren’t mistakenly trained
There is certainly some merit to this suggestion, but the developers would have to be careful with the implementation - you wouldn’t want users losing data when they update their NP++ installation. Even if the default is safely changed, that wouldn’t change the fact that the feature has room for improvement; if there’s a sensible way to mitigate data loss, isn’t it prudent to follow through on it?
-
@mathlete2 said in Unsaved Files Recovery Script:
The training we are referring to is coming from standard usage of NP++: users are observing that, if they don’t explicitly close an unsaved file before closing NP++ itself, the content will be restored the next time NP++ is opened in the vast majority of situations (including system restarts and updates, and even NP++ updates). As you alluded to, this inadvertently lulls some users into a false sense of security; that’s the “training” we are referring to. Are these users a bit short-sighted for thinking this way? Perhaps. However, given how often it does work, it’s not difficult to understand why so many users over-estimate the effectiveness of this feature.
It does address it. No one, that makes their way here, can claim to be a computer neophyte. Period. If they have done any computer work previously, they will have learned the major rule. Save and save often. That NPP has an additional edge of protection, should not make them abandon their common sense computer behavior that should have been ingrained in them before they got here. This is my point.
Because it’s suddenly fashionable to jump off a cliff, does that mean everyone should go jump off a cliff? Certainly not, so pardon me, if I don’t allow wiggle room to avoid the common sense solution, to the problem. Let them lose their data, until they get smart enough, not to. Can’t say it any more plainly. I don’t believe we should allow their assumptions (ass out of you and me) to rule the development direction, nor our concern over their bad habits. Callous, perhaps, but that is my experience to make certain that they get to learn the importance of the good habits, versus the bad.
@mathlete2 said in Unsaved Files Recovery Script:
There is certainly some merit to this suggestion, but the developers would have to be careful with the implementation - you wouldn’t want users losing data when they update their NP++ installation. Even if the default is safely changed, that wouldn’t change the fact that the feature has room for improvement; if there’s a sensible way to mitigate data loss, isn’t it prudent to follow through on it?
My experience so far, is that past installations, do not change with updates, so that isn’t the issue. It’s the new installations, however, that don’t have the defaults set, which means they need to set things the way they’ll want them from that point, rather than get default actions that will teach them bad habits. Up to them to set the settings to do what they want, and now we get to the point that if they don’t know, they need to read.
And I’ll repeat, that the sticking point that you, I and @Private-Confidential don’t seem to agree on, is that the prudent way to mitigate data loss, is to purposely save the document, originally and often. That is the part that their and your point in this discussion keeps discounting. The personal responsibility aspect. If this was my program that I’m developing and someone came to me with that argument, I’d advise them to find something else that fits their needs, as this program is obviously too advanced for their abilities…and move on.
-
@Lycan-Thrope said in Unsaved Files Recovery Script:
No one, that makes their way here, can claim to be a computer neophyte. Period. If they have done any computer work previously, they will have learned the major rule. Save and save often. That NPP has an additional edge of protection, should not make them abandon their common sense computer behavior that should have been ingrained in them before they got here.
Because it’s suddenly fashionable to jump off a cliff, does that mean everyone should go jump off a cliff? Certainly not
(…)
the prudent way to mitigate data loss, is to purposely save the document, originally and often.Once again, we agree on these points. However, they aren’t as relevant to the points we are making as you seem to think:
I have already acknowledged that most NP++ likely discover the Session feature by accident, but perhaps I wasn’t clear about linking this discovery to the independent usage that I also mentioned. Personally, I discovered this feature as I was using NP++ on my own, and I’m guessing that this is true for most of the other users who make use of this feature as well. So, your “fashionable to jump off a cliff” argument isn’t likely relevant here (at least not for the majority of users).
Either way, users who do make use of it learn that it is (surprisingly?) reliable - content is preserved in the vast majority of use cases. However, despite this high degree of reliability, I don’t think users are relying on it for important data, regardless of how they discovered it in the first place. Personally, I simply use it for things like scrap notes - content that isn’t important enough to warrant a new file in any of the various directories that I work out of, but important enough to be (potentially) useful again in the future, yet would not be significantly missed if lost.
Obviously, I can’t speak for other users, but I’d imagine that they use this feature for the same sort of thing. Either way, I certainly agree that anyone who relies on it for more important content is doing so unwisely. In fact, this principle would still apply if the feature were to be reinforced: the goal of the proposed reinforcement is not, as you seem to fear (and rightfully so), to make users comfortable with expanding the importance of the content within their preserved files, it is simply to mitigate inconveniences. So, it’s not crucial to reinforce any limitations that this feature might have, but it is undeniably preferable.