jmg,
I don't think Save-Me-As is the one we're talking about here. 'Rename' means changing the original file with new name, 'Save-Me-As' is just saving a new copy with new name. Actually 'Rename' is very popular in lots of editor, like UltraEdit, editplus.
XS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I always thought Windows did its best to lock a file that was 'in use' (in this case, being edited by Notepad++), so that you couldn't do things like rename an 'in use' file... bringing about the need to make a copy of the file, rename _that_, and then delete the 'original' once it's been released.
If that's the case, then it wouldn't be easy for such a feature to be implemented in Notepad++, at least with the standard DOS/Windows disk calls. (Of course, I could be wrong.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It depends on the details. With NP++, windows allows a rename of the file outside the
NP++ menus, and NP+ keeps the copy in memory, and will alert if the settings are right.
Most Files I edit, are generated ones, so save-as is fine for me (as I'm not worried about removing a copy that will be soon replaced anyway).
That said, some editors DO have a rename choice, and so there is a case to add that,
for those who really miss it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Haibara,
the implementation is difficult, i agree and totally understand.
the requirement is odd from any technical aspects, i don't think so. Most commercial editors have the function actually, and most people believe the NPP can win the commercial ones.
XS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, since NP++ handles the locks anyway, it should be a minor thing to change. Release locks, rename the file, add locks again. Or, even easier, "Save me as" + delete the original file. Must be less than five lines of code.
"Save me as" does not do the job because I still have to go back and delete the original file manually.
Nice to know people agree.
- Peder -
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, I think it's the OS that handles the 'locking,' not the application. It just prevents other things from attempting to modify the file while something else is already 'using' it (to avoid problems). In theory, NPP would have to actually close/release the document before it could rename it.
(I'm no expert on the DOS/Windows filesystem's way of doing things, of course, and I'm perfectly willing to admit I'm probably wrong... someone who knows more about it, please speak up. :D )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Windows indeed locks a file if an application requests it to do so. Notepad++ will only lock the file when reading it/writing it, afterwards it'll be freed for any other application (otherwise, the entire Modification-Autodetection would be obsolete :P).
please define the whole Rename option. Should it actually delete the existing file? Should it change the name of the tab, but not save it? How much does it differ from the Save As option as to me it looks quite similar, I know its not exactly the same though.
Its probably more than 5 lines of code but not much, it probably going to look an awful lot like Save as :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, the program already has the option "Save me as...". This option will save a copy of the current file as something new, close the old file, and keep the new file in the open tab. Rename would be more or less exactly similar. I gather the program has released any locks that might have been attached to the original file that was just closed. Once the normal "save me as" steps have been completed, simply delete the original file and the current file will have been renamed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, that's not 100% true. Of course, renaming the file could be achieved this way. But when you use a tool that also monitors the original file, like FileHamster does, you will lose any revisions made after the Save As feature is used.
FileHamster won't know you renamed the file and will not monitor the new file with the changed name (unless you have a watch at the directory instead of single files).
If you delete the original file, FileHamster will ask you if you want to remove the revisions (which I guess you don't).
If you have a watch set at the complete directory, new revisions will be stored for the new file, but you will have two separate revision histories instead of one.
One might as well argue that Save As isn't necessary, because one can close the file, rename it, and open the renamed file again in Notepad++.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So in this case, better to save the doc, then use win32 apis to move the file (as in explorer) and adjust the name of the document. Its save as, but no copy left.
If Don agrees, such a feature could be added methinks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Upon right-clicking a tab page it would be nice to be able to rename it in one go.
Perhaps someone had the same idea before you and posted it as well.
This has been discussed before.
Save-Me-As is what you are after ? (in 4.9.2)
jmg,
I don't think Save-Me-As is the one we're talking about here. 'Rename' means changing the original file with new name, 'Save-Me-As' is just saving a new copy with new name. Actually 'Rename' is very popular in lots of editor, like UltraEdit, editplus.
XS
I always thought Windows did its best to lock a file that was 'in use' (in this case, being edited by Notepad++), so that you couldn't do things like rename an 'in use' file... bringing about the need to make a copy of the file, rename _that_, and then delete the 'original' once it's been released.
If that's the case, then it wouldn't be easy for such a feature to be implemented in Notepad++, at least with the standard DOS/Windows disk calls. (Of course, I could be wrong.)
It depends on the details. With NP++, windows allows a rename of the file outside the
NP++ menus, and NP+ keeps the copy in memory, and will alert if the settings are right.
Most Files I edit, are generated ones, so save-as is fine for me (as I'm not worried about removing a copy that will be soon replaced anyway).
That said, some editors DO have a rename choice, and so there is a case to add that,
for those who really miss it.
Haibara,
the implementation is difficult, i agree and totally understand.
the requirement is odd from any technical aspects, i don't think so. Most commercial editors have the function actually, and most people believe the NPP can win the commercial ones.
XS
Well, since NP++ handles the locks anyway, it should be a minor thing to change. Release locks, rename the file, add locks again. Or, even easier, "Save me as" + delete the original file. Must be less than five lines of code.
"Save me as" does not do the job because I still have to go back and delete the original file manually.
Nice to know people agree.
- Peder -
Actually, I think it's the OS that handles the 'locking,' not the application. It just prevents other things from attempting to modify the file while something else is already 'using' it (to avoid problems). In theory, NPP would have to actually close/release the document before it could rename it.
(I'm no expert on the DOS/Windows filesystem's way of doing things, of course, and I'm perfectly willing to admit I'm probably wrong... someone who knows more about it, please speak up. :D )
Windows indeed locks a file if an application requests it to do so. Notepad++ will only lock the file when reading it/writing it, afterwards it'll be freed for any other application (otherwise, the entire Modification-Autodetection would be obsolete :P).
please define the whole Rename option. Should it actually delete the existing file? Should it change the name of the tab, but not save it? How much does it differ from the Save As option as to me it looks quite similar, I know its not exactly the same though.
Its probably more than 5 lines of code but not much, it probably going to look an awful lot like Save as :)
Well, the program already has the option "Save me as...". This option will save a copy of the current file as something new, close the old file, and keep the new file in the open tab. Rename would be more or less exactly similar. I gather the program has released any locks that might have been attached to the original file that was just closed. Once the normal "save me as" steps have been completed, simply delete the original file and the current file will have been renamed.
Well, that's not 100% true. Of course, renaming the file could be achieved this way. But when you use a tool that also monitors the original file, like FileHamster does, you will lose any revisions made after the Save As feature is used.
FileHamster won't know you renamed the file and will not monitor the new file with the changed name (unless you have a watch at the directory instead of single files).
If you delete the original file, FileHamster will ask you if you want to remove the revisions (which I guess you don't).
If you have a watch set at the complete directory, new revisions will be stored for the new file, but you will have two separate revision histories instead of one.
One might as well argue that Save As isn't necessary, because one can close the file, rename it, and open the renamed file again in Notepad++.
So in this case, better to save the doc, then use win32 apis to move the file (as in explorer) and adjust the name of the document. Its save as, but no copy left.
If Don agrees, such a feature could be added methinks.