-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make session inaccessible files remembered (part 2/2) #14252
Conversation
Fix issue #12079 If a file was not backed up when a session closed, previously when the session was reloaded, those files would simply disappear and the user could not choose to keep them Now an empty placeholder buffer will be created for any files without backup with a filename that doesn't exist. This placeholder can be reloaded from hard drive if the file it corresponds to is recreated, and its placeholder status will persist as long as it stays empty. The handling of backed-up files that don't exist will remain the same.
…b.com/molsonkiko/notepad-plus-plus into molsonkiko-fix_session_missing_files_remembering
Done, please check it. |
👍 I'll continue testing it tomorrow. STR: Result: STR: Result: How about replacing - You could then display the user-session file-name in the message. "Open Session in New Instance (and save on exit)" complicates the implementation/messages.
Is that still needed? |
Fixed.
Could you elaborate it?
Simplified. Please check the latest commit. |
👍 But this creates another issue. Result:
I understand you don't like it.
I'm referring to the potential confusion you mentioned in #14202 (comment). The messages should indeed make it clear. User-sessions.
session.xml.
"Open Session in New Instance (and save on exit)" will indeed cause confusion. |
You get the same result without deleting the files. - Probably not related to this PR. |
Cannot reproduce it:
Implementing... |
Done. However, according google, "place-holder" should be "placeholder", so I maintain "placeholder".
"Open Session in New Instance (and save on exit)" was a frequent-request feature which was implemented quite long time ago, so I believe a lot of users depend on this feature. You can check the latest commit in which the messages have been refined (with the user session file name). |
It seems to work like a charm. 👍 Thanks again.
👍
Instead of
? And
Do you mean the (and save on exit) part was a frequent-request feature?
Could you please try the exact steps? STR: Result: |
Could you please test this PR? |
Regarding "place-holder" vs "placeholder", I definitely agree that "placeholder" is the right choice. @alankilborn suggested I chime in, since I was the one who submitted #12079. Based on my experiments, this meets my expectations for reasonable behavior regarding the session when a file/directory/mounted-drive goes temporarily missing, and I would be happy if this is the version that goes "live". Thank you for all the effort that the whole team put into going through various edge cases, and all the back-and-forth that occurred. The end result shows the benefit of getting a lot of different perspectives on this issue. |
Thank you for submitting the issue and testing this PR. That was a nice dodge. :) |
@Yaron10
Yes.
Cannot always reproduce it. Note that I copied new compilerf bin to replace |
👍
I'm using NPP portable, and I don't have that entry in the context menu. Both files are selected, but does it make a difference if you right-click on A.sess or AB.sess? I'm using QTTabBar and OldNewExplorer on Windows 10. I always get a wrong result: No B in MAIN_VIEW. On using Open in the context menu, it depends on the file I right-click. #14161 might be related. |
@Yaron10
I suppose by "right-click" you means Edit with Notepad++ of context menu under Explorer which comes Windows 10/11. In this scenario, it works fin, as expected.
Always under Explorer which comes Windows 10/11, when you select 2 files and use Open command from the context menu, or type ENTER key to open 2 files: the system run In this scenario, I can reproduce the problem, not exactly the same result though (but even worse): I will see what I can do about it. |
The test results (with open) are different on mono-instance - multi-instance works perfectly - and it's surely due to the race condition: System launches several Notepad++ commands simultaneously and all commands lead to one instance for the execution in a random order. |
Yes, I encountered a similar case after posting my STR.
Thank you for looking into it and good luck.
👍 |
It's indeed the same issue of #14161: As a result, I won't open a similar issue as #14161, and this issue won't be fixed and probably can't be fixed. |
First, I'd like to emphasize again that I was initially wrong: the issue is not related to this PR, and can be reproduced in v8.5.7 as well.
I understand your explanation and recommendation. The question is if NPP should (and could) make sure this is not the end result. |
Alternatively, and as it's a rare case, it can be labeled as a "known issue". |
It's already done in the code.
Why not? I can always labeled #14161 as "known issue". But what's the advantage? |
Thank you for the explanation.
That issue is only reproducible with PortableApps.
So that we at least have an open issue and not just some comments in a closed PR. |
Based from #14168
Continue with #14202
Fix #12079, fix #12744, fix #13696