save-as-failure and focus is where , now ?
bug report or clarify if is bug .
i found notepad++ not performing a “save as”-operation successfully and other case i get confused by notepad++ on which file i am working on now . short said : notepad++ shall stay focussed on original file after a save-operation ! or do i suffer misunderstanding the logic of notepad++ ? is it a edgy linux , unix ,… specific thinking , or is it the american programming style lisp versus pascal of seeing the world (programming paradigm). i dont want to offend , but may be there is another thinking style , i was already called a “different kind of thinker”. :) , then i asked for insight to a “requirement catalogue” of design-plan of developing npp . nope!.
anyway : i would like notepad++ to do what it says (to do). nail down to the statements .
example case 1 : having file text.txt(version1) in folder dir1 , opening it in npp , doing changes , then save this with “save-as” as text.txt(version2) in dir1 again (this means overwriting/replace file). the message window appears : file already exists, do i want to replace the file ? yes/no ? doing: yes ! then an error message window appears , saying: the file is already openend in notepad++ (thats all, no more information given). i see the file still opened in notepad++ , with my made changes still in it . looks alright . question : is my file(version2) sucessfully written to disc/dir1 ? as i look with other editor , file is there , but not the changes(->version1) , file isnt saved as i wanted , and i dont know about . when i close the file , i am asked if i want to save the file text.txt ? yes/no/cancel . when i do yes , the changes are saved to text.txt(version2) , lukily finally . when i instead do no , no changes are saved at all , my work would be lost .
example case 2 : i opened text.txt(versionA) in folder dir1 in npp , i do changes on it , i do “save as” of this file into folder dir2 . it works ! text.txt(versionB) is in dir2 , with changes made being saved into dir2/text.txt(versionB) . and dir1/text.txt(versionA) is same as before . question : which file is now opened in notepad++ after simply saving intermediate work (maybe as backup)? i would suspect to still work on the orinal file(versionB) , lets say i think i am still focussed on dir1/text.txt(versionB) . ( i cannot determine directly , which file is in focus of notepad++ , but i can hoover the mouse-arrow over file-tab to look at the entire filepath and name ) but … notepad++ did switch its focus over to the lately saved file : dir2/text.txt(versionB) , i am now not working on the original file anymore , but instead on a idea-backup-version . while i still think i work on the original file dir1/text.txt(versionB) i do an undo of the changes(versionA) and make different changes(versionC) , i want to keep in original file . as i intentionally close my set-into-original-state-again-file(versionA) with additional changes(versionC) i want to save the file with answering the save window : save file dir2/text.txt(versionC) ? yes/no/cancel ? , going with yes! , because i dont read and believe i am working still on orginal file(versionC) . sure last step is a mistake of mine , but it will also lead to erase the changes i wanted to save in dir2/text.txt(versionB) .
solution : instead i should have had closed dir2/text.txt(versionB) and have to re-open dir1/text.txt(versionA) to make other changes (versionC) and save-as : dir1/text.txt(versionC).
notepad++ shouldnt change the focus from original file to another version of file without instructing me about . notepad++ shouldnt touch my backup-versions if had not instructed me it was working on that file .
notepad++ doesnt switch focus if i use “save a copy as …” , and “save as” shouldnt do either .
if i start a new file and do “save” i am prompted to give a name , it looks like a save-as-operation . npp switches focus then to this first saved version. a new “save” doesnt prompt a “save-as”-operation again and focus is still on that new saved file(version2)
“save-as” can be used as selfmade side-backup , it should act like “save-a-copy-as…” as far as the focus of npp is concerned . and it should perform the save under same filename and directory (if i want so) , even and especially when the file is already opened in notepad++ , it should simply perform the replace-operation , (like any other program i know , can do !) should be fail-safe , fool-proof , normal , just do as it says : “save-as” .
btw : i use always only “save as” for save-operations , because i want to exactly know where and under what name and extention my files are stored , and i will stay with it.
Notepad++ v7.9 (32-bit)
Build time : Sep 22 2020 - 03:24:22
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 7 Professional (64-bit)
OS Build : 7601.0
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
Terry R last edited by
i found notepad++ not performing a “save as”-operation successfully
for example case 1. WHY are you using “save-as” then using the original name and folder. Just do a “SAVE”! That’s the logical approach, at least for the majority of users.
for example case 2. Again I’d say that’s logical. You have updated the file but wish to save the newer version as a different name and/or folder. So Notepad++ will now show that tab as being the new file.
If you want to save an intermediary file in a different folder and/or different name use the “Save a Copy As” option. This will save a newer version, but keep the tab as the original name.
Why would there be a “save as” AND “save a copy as” options doing the same thing with the file currently in focus. That’s why there ARE 2 options, they do different things.
These are NOT bugs, most users know they they function and are fine with that, it’s just logical. So if you intend to stay with the way you want to use NPP, then you will have to understand that NPP does NOT think the way you do and will ALWAYS do it the NPP way, not the @carypt way.
well … think again . everything is ok ? as it should be ? nothing can go wrong ?
sry if i havent found the right mood in my explanation , but i dont meant it offending in any way .
WHY are you using “save-as” then using the original name and folder. Just do a “SAVE”! That’s the logical approach, at least for the majority of users.
Not sure why @carypt felt the need to open a brand new thread to continue expounding on this, when he started it in that other thread.
everything is ok ? as it should be ? nothing can go wrong ?
What exactly do you think could go wrong here?
Try to keep your explanation brief.
I must admit that your “example case 2” above was kind of a rambling mess that lost me – sorry.
“Save As” works in Notepad++ as it works in countless other Windows programs. To do anything different would be confusing to the masses of Notepad++ users.
Perhaps you desire a “Save As Copy and then Open The Copy Retaining The Original Open As Well” command? :-) Kind of a long name…
But…this scares me, as it may mean that you and I are thinking alike: I have a script in my right-click context menu that does just this; snippet of my context menu:
I think that @carypt has a point re a small part of their ‘case 1’. Many other rograms either overwrite the current file silently or at least warn you before when saving-as a file (Microsft Word 2013 does it silently, Microsoft Notepad does warn you before). So, while I can perfectly live with the error message from Notepad++, I can understand some users would expect Notepad++ to overwrite the current file as a simple save operation would do.
Personally, I don’t think the rest of the cases are logical, not at least from my experience with software I usually work with.
yes , sorry , i am writing too long , bland …
the error message does not tell me , the save-as wasnt done correctly or at all . and why shouldnt notepad++ do a simple save-as operation under all eventualities . it should be fail safe , and doing what it supposes to do . aside from that , the focus- switch may be another case .
I think that @carypt has a point re a small part of their ‘case 1’
I respectfully disagree.
You gave 2 examples of 2 other programs that do different things in the scenario. Notepad++ doing a 3rd different thing is probably just fine (there could be no established way to handle this case).
The fact that Notepad++ does not save the file is perfectly consistent with the fact that it gives you an error message: SaveAs means that you want to save the file with a different name, and since you neglected to do that (you chose to save with the same name), Notepad++ is telling you that you didn’t get what you wanted. It leaves your changes unsaved so that you can retry the same operation again (and fix your error).
I really don’t have any more to say on this topic; it is a dumb one.
So, I’m out. :-)
i must insist on the fact , the error message give not information about a data loss , but instead about notepad++ made a mistake to have opened the file already . it is misleading .
and notepad++ isnt able to replace a file , because it is busy with displaying nothing new .
save-as simply offers the possibility to check where and what name.ext is saved .
simple save dont show up like that .
i made issue report here : https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9091