Prompt for save if NPP open when Win shutdown
If I close normally (Alt+F4), or top right X, it closes silently. If I shut down Windows, it prompts to save the various unsaved text files I have open for notes.
v 8.4.7 32-bit, Win 10.
Thanks Peter. I preferred it the way it was for a number of “new 1”… “new n” scratchpad notes. OK, I must remember to save first.
OK, I must remember to save first.
Not necessarily. It is always better to have your data standardly saved as files, but if you insist and want to rely solely on the N++ backup engine, you can:
- check in the N++ that you have your N++ backup mode ON (menu Settings -> Preferences… -> Backup -> checked both the “Enable session snapshot and periodic backup” and the “Remember current session for next launch”
- then at the next possible Windows restart/shutdown with N++ still running and with unsaved data there, select the “Restart anyway” option on the blue OS restart screen (the N++ will try to behave like you manually close it, i.e your Alt+F4 etc…) or select “Cancel” there and then close N++ manually as usual
This way you should have your N++ session intact at the next N++ start (for unsaved N++ tabs, there will be your “new 1”… “new n”).
In case of a forced critical Windows restart/shutdown (e.g. some Windows Update in action), there will not be this blue OS restart screen offer at all, but the N++ backup engine will still try to do its work as described above (if set ON, of course).
Folks, can you please explain me something, as I really don’t get it. I am using NPP for years and often have a few text windows open for taking temp notes which are not saved to file. I liked the way NPP was not asking me to save those to files. Since the last update, NPP is asking me to save to file when I shutdown Windows and so is blocking shutdown. And despite my search into Preferences, I cannot find a flag to turn that infuriating behavior off. The last time I was really pissed off with NPP when I moved from the 32bits to 64 bits version and lost all my files. This was a long time ago, I forgot. But now, again, NPP designers just break a feature in my workflow and I don’t find a way to restore the previous behavior. Is this an attempt to move users to SublimeText? If so this may very well work. So I’ll give this forum a last chance to help me remedy this problem, if not then byebye NPP.
@PeterJones I don’t want NPP to block shutdown and have to “Restart anyway”, the workaround above is stating we need to do this. I want the bahavior that was before this update, i.e. something that just works.
I don’t want
Developers cannot make all users happy all the time. I am not one of the Notepad++ developers, but given the number of questions, arguments, and complaints I respond to in the forum, I can feel some of their pain.
As explained, the changes were made because many (many, many) users were complaining that when Windows Update or similar would cause an unexpected reboot, their unsaved files would be lost. And lost data is more annoying (and more of a failure on the part of Notepad++) than you having to do an extra click. So I doubt you’d be able to complain loud enough about not wanting to change your behavior to convince them to override the decision they made based on the many valid complaints about “a windows reboot caused my data to be lost” which were addressed with this change to Notepad++.
I’m sorry you don’t like the change.
You can certainly discuss this behavior here, among fellow users. But, if your intent is to motivate developers into making changes to the code that suit you (perhaps via the dubious approach of emotional blackmail, e.g. “byebye NPP”), this is the wrong place for that.
The code is developed on Github and communication with the developers happens via commenting in ISSUES there.
NPP designers just break a feature in my workflow
Suggest you either:
- adjust your workflow to the new behavior
- ask the developers to make a change that suits you; see “ISSUES” link above
- petition the author of Notepad++ for a refund of your license purchase price due to your dissatisfaction – my understanding is that he never hesitates to give refunds based on a customer being unsatisfied
@PeterJones I don’t know the exact nature of the change or the original issue, but as you’re saying this is about asking for saving on Windows Update restart or else users would loose their changes, then why hasn’t the following behavior been implemented:
- for text windows which are associated to a filename, ask whether to save
- for text windows which are not associated to a filename, do not ask to save (and preserve the files in temp folder as NPP used to do).
If things had been implemented this way, I would not have seen any change and things would still work for me.
@xomx can explain the technical details far better than I can. However, from how I understand it, your general procedure was essentially the old behavior; however, in rare circumstances, the Windows Reboot process wasn’t “playing nice”, and it was interrupting Notepad++'s behind-the-scenes saves before they could finish, causing it to appear that Notepad++ had lost the data, when really it was the OS (again, this is just my non-expert understanding). From how I understand it, this new dialog forces Windows OS to play nice. But I hope @xomx will come and explain things better.
Maybe if there will be more requests (hopefuly more polite next time, not such demanding crap like from @Olivier ) from the N++ community, he will change his opinion like I did.
As for the Windows Reboot risks for the N++ - I believe that nowadays the two main previous problems (NUL data corruptions and emptying of the session.xml file by Windows Update restarts) have been fixed for good. Even if I personally always explicitly save my data before an OS restart/shutdown, I think that the N++ users themselves should be the ones deciding what they really want. If they want to play a game and restart N++ with unsaved data, they should be able to do it. Also from what I have been able to see during N++ debugging sessions until now - when ON, the N++ backup engine gracefully handles its work even during a forced critical Windows Update restart.
Thanks for your input. I don’t disagree that it could be handled cleaner – or, more accurately, based on the descriptions here and your discussion in the issue you linked, it sounds to me like I do agree that it’s not handled very gracefully right now. If I came across like I thought that the current implementation was the best possible solution, I apologize. I apparently need to work on changing how I explain such things to people, because when I do, it can often raise their hackles.
However, since I never reboot with unsaved files, I have never experienced the unsaved-files-at-reboot handling, either old or new, so I don’t have much personal stake in this particular issue, other than trying to explain to users why it changed recently. (I personally use AutoSave Plugin at work when I’m working with critical files, and I get logged out at home enough that I never have a file open in Notepad++ during a windows update, and don’t understand how anyone would risk data loss by not saving early and often. That’s always my recommendation to anyone who has a problem with “unsaved files”. But, as you say, in the end, it is up to them.)
Was the “restartable app” request in the forum ever converted into an official feature request on GitHub? If so, maybe approach your idea here as a response to the “restartable app” feature; and then, when you add that “restartable app” feature, if it “just happens” to also address the desire to be able to turn off the request-for-confirmation on unsaved files at reboot, then maybe you’ll be able to do both at the same time. :-) Good luck.
since I never reboot with unsaved files
But I think that many N++ users just prefer simplicity & speed here, they are running N++ with its backup-mode ON and use the opened&unsaved N++ tabs as some scratch-buffer etc.
Was the “restartable app” request in the forum ever converted into an official feature request on GitHub?
No. But now, after Don preliminary agrees even with this proposal, I will create one, when I find a spare time for a implementation.
maybe approach your idea here as a response to the “restartable app” feature; and then, when you add that “restartable app” feature, if it “just happens” to also address the desire to be able to turn off the request-for-confirmation on unsaved files at reboot, then maybe you’ll be able to do both at the same time. :-)
Are you a fan of the famous Sun-C’? Because it seems you know some of his The Art of War negotiation strategies :-) Joking aside, nothing like that will be needed as Don now agrees with the changes requested here for the users with the backup mode ON. I am going to prepare a PR for this over weekend.
Folks, I am sorry about the tone of my message above, I was very upset with this workflow-breaking change. Apparently some changes are going to be made in the next update, I hope this issue with shutdown will be addressed in a smart way (i.e. with no data loss on windows which do not have associated file). Keep up the good work!
So, what is the last stable version without this feature?
@xomx Thank you! For the first time in almost 10 years using NPP, I was going to rollback and disable updating. Very very annoying feature.