When I choose Save As, the File Save Dialog opens in the "current" dir, that is the directory that was last saved to.
If I choose to Save As, I would like NP++ to take the file's own dir as the starting point. I do not (always) want to change the path to the file. Most of the times it's only to store another version of the same file under a similar name in the same directory.
When I right click on the tab, the Dutch version shows "Current dir path to Clipboard" as the third filename-to-clipboard option. I guess this is simply the English tranlation. I would like to propose to change this into "File dir to Clipboard", to avoid confusion with what is otherwise seen as the current dir (like the dir the application started in, which seems to be the current default for the File Save Dialog).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We must be doing something different. Save As... works as you'd hope on my system. I choose a tab then click File: Save As..., and the File Save dialog is already positioned at the current tab's file directory.
Can you help us figure out what's the difference?
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just opened NP++. It reloaded the files that were open on last session. If I click "Save As" on one of the files' tab bar, I get the NotePad++ installation directory in the Save File Dialog, which isn't the file's location. So there's really nothing I do to get this situation.
What do you get this way?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just tried the same experiment, but with different results.
I open NP++, and it reloaded files from the last session. When I click either "Save me As" on the file's tab, or "Save As..." under the File menu, I get the same thing: The Save File Dialog is prepositioned in the file's directory. Repeating these steps on a different tab whose file is in a different directory, again the Save File Dialog is prepositioned in that file's (different) directory.
I'm using NP++ 4.1. You?
Can you compile NP++ from the source code with debug information? If so, put a breakpoint near the top of the method
char * FileDialog::doSaveDlg()
in the file FileDialog.cpp and inspect the value of the variable "dir". Also, put one on the line
fDlg.setDefFileName(PathFindFileName(str));
in the method
bool Notepad_plus::fileSaveAs()
in the file Notepad_plus.cpp and trace into the execution of that method call.
Let us know what else you learn.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Settings: Preferences...: Global, I have the box "Remember the last operation directory" unchecked. If it's checked on yours, then that probably accounts for the difference.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, thanks! Yes, I had this option checked before in an earlier version, hoping this would work for the Find in Files feature. It had this annoying thing of, well, remembering the last operation directory, but not showing this a the default value when opening the separate dialog again. This is fixed with the new Find in Files feature, anyway.
I think the description "last operation directory" in itself is not so clear.
Is this, for instance, the directory a file was last opened from, or saved to, or the last of both? What kind of operation is meant here?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perhaps create both. I can remember and imagine situations in which you open files to be edited from one directory and save the new versions in another directory. A single "retain last operation's directory" would not be very convenient in such a situation, if you save each file right away after opening and editing it.
As you can see, it was not clear to me at first that operation meant open or save. I thought I was so lucky to find the thing for the Find in Files directory that bugged me.
I guess you could create two options, "retain file open dialog directory" and "retain file save dialog directory".
Alternatively, you may also allow the ability to specify what to do for newly created files. If the retain option is on for the save directory, should the file save dialog for new files start from the last saved to directory, which may be changing by saving one of the other files, or from a specified directory. This would introduce a third option: "retain save directory for new files". This option could be enabled, dependent on the "retain file save dialog directory" option being checked.
It seems to me that, when overwriting files (saving again instead of "as"), the last save directory would change also. So the word dialog in the name of the options wouldn't be fully correct. On the other hand, this option is about the directory that will be shown in that very dialog.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have some problems when creating copies of opened files.
I open files from one directory.
I select all and copy.
I create a new file.
I paste the selection.
I edit the text.
Now if I want to save, each time the Save File (As) Dialog opens from the opened files directory.
Why is this? The option "remember last operation directory" is not checked.
I want to save all files to the same destination directory. I think it's a good thing to separate the open file directory from the save file directory, as it currently seems not to be. If this would be the case, I (can only) guess that I could check the options for both directories te be remembered, in my current situation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think it is also clear that for opened files the Save As dialog should always allow to simply save the file in its current directory and thus start from there. Of course, allowing to choose to save a file to the last directory that was saved to, allows to save all opened files quickly to the same destination directory.
However, when wanting to open a file, just a saving a new file, where to start or continue? I think remembering the last directory for the specific type of action makes more sense than opening a directory that happened to be the last one another file was written to (not on purpose, because of using simply Save instead of Save As).
The question then would be: should NP++ start the File Open dialog with the last directory a file was opened from, or should NP++ start from the same folder over and over again (a favourite?), or even optionally the very last directory _any_ action (save, save as) was performed in. Perhaps you could also add the option to open the File Open dialog from the current file's own directory. That would be similar to the Save As dialog always starting from the file's own directory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
>Perhaps you could also add the option to open the File Open dialog from the current file's own directory. That would be similar to the Save As dialog always starting from the file's own directory.
I believe that is the current behavior -- at least, provided the "Remember the last operation directory" option is not checked. Try it.
Regards.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it is. The current behavior is to start the File Open Dialog from the current file's own directory, if the "remember last operation directory" option is not checked.
There is however one small bug with this. Changing this setting will only be effective after the next tab change, while I think it should be right-away. So, when closing the preferences dialog, the operation directory (or directories) should be updated as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I choose Save As, the File Save Dialog opens in the "current" dir, that is the directory that was last saved to.
If I choose to Save As, I would like NP++ to take the file's own dir as the starting point. I do not (always) want to change the path to the file. Most of the times it's only to store another version of the same file under a similar name in the same directory.
When I right click on the tab, the Dutch version shows "Current dir path to Clipboard" as the third filename-to-clipboard option. I guess this is simply the English tranlation. I would like to propose to change this into "File dir to Clipboard", to avoid confusion with what is otherwise seen as the current dir (like the dir the application started in, which seems to be the current default for the File Save Dialog).
We must be doing something different. Save As... works as you'd hope on my system. I choose a tab then click File: Save As..., and the File Save dialog is already positioned at the current tab's file directory.
Can you help us figure out what's the difference?
Greg
I just opened NP++. It reloaded the files that were open on last session. If I click "Save As" on one of the files' tab bar, I get the NotePad++ installation directory in the Save File Dialog, which isn't the file's location. So there's really nothing I do to get this situation.
What do you get this way?
I just tried the same experiment, but with different results.
I open NP++, and it reloaded files from the last session. When I click either "Save me As" on the file's tab, or "Save As..." under the File menu, I get the same thing: The Save File Dialog is prepositioned in the file's directory. Repeating these steps on a different tab whose file is in a different directory, again the Save File Dialog is prepositioned in that file's (different) directory.
I'm using NP++ 4.1. You?
Can you compile NP++ from the source code with debug information? If so, put a breakpoint near the top of the method
char * FileDialog::doSaveDlg()
in the file FileDialog.cpp and inspect the value of the variable "dir". Also, put one on the line
fDlg.setDefFileName(PathFindFileName(str));
in the method
bool Notepad_plus::fileSaveAs()
in the file Notepad_plus.cpp and trace into the execution of that method call.
Let us know what else you learn.
Regards.
Greg
In Settings: Preferences...: Global, I have the box "Remember the last operation directory" unchecked. If it's checked on yours, then that probably accounts for the difference.
Regards.
Greg
OK, thanks! Yes, I had this option checked before in an earlier version, hoping this would work for the Find in Files feature. It had this annoying thing of, well, remembering the last operation directory, but not showing this a the default value when opening the separate dialog again. This is fixed with the new Find in Files feature, anyway.
I think the description "last operation directory" in itself is not so clear.
Is this, for instance, the directory a file was last opened from, or saved to, or the last of both? What kind of operation is meant here?
> Is this, for instance, the directory a file was last opened from, or saved to, or the last of both?
Both.
That's why it's "last operation directory" rather than "last save directory" or "last open directory".
How about "last open/save directory"? Or you have a better idea?
Don
Perhaps create both. I can remember and imagine situations in which you open files to be edited from one directory and save the new versions in another directory. A single "retain last operation's directory" would not be very convenient in such a situation, if you save each file right away after opening and editing it.
As you can see, it was not clear to me at first that operation meant open or save. I thought I was so lucky to find the thing for the Find in Files directory that bugged me.
I guess you could create two options, "retain file open dialog directory" and "retain file save dialog directory".
Alternatively, you may also allow the ability to specify what to do for newly created files. If the retain option is on for the save directory, should the file save dialog for new files start from the last saved to directory, which may be changing by saving one of the other files, or from a specified directory. This would introduce a third option: "retain save directory for new files". This option could be enabled, dependent on the "retain file save dialog directory" option being checked.
It seems to me that, when overwriting files (saving again instead of "as"), the last save directory would change also. So the word dialog in the name of the options wouldn't be fully correct. On the other hand, this option is about the directory that will be shown in that very dialog.
I have some problems when creating copies of opened files.
I open files from one directory.
I select all and copy.
I create a new file.
I paste the selection.
I edit the text.
Now if I want to save, each time the Save File (As) Dialog opens from the opened files directory.
Why is this? The option "remember last operation directory" is not checked.
I want to save all files to the same destination directory. I think it's a good thing to separate the open file directory from the save file directory, as it currently seems not to be. If this would be the case, I (can only) guess that I could check the options for both directories te be remembered, in my current situation.
I think it is also clear that for opened files the Save As dialog should always allow to simply save the file in its current directory and thus start from there. Of course, allowing to choose to save a file to the last directory that was saved to, allows to save all opened files quickly to the same destination directory.
However, when wanting to open a file, just a saving a new file, where to start or continue? I think remembering the last directory for the specific type of action makes more sense than opening a directory that happened to be the last one another file was written to (not on purpose, because of using simply Save instead of Save As).
The question then would be: should NP++ start the File Open dialog with the last directory a file was opened from, or should NP++ start from the same folder over and over again (a favourite?), or even optionally the very last directory _any_ action (save, save as) was performed in. Perhaps you could also add the option to open the File Open dialog from the current file's own directory. That would be similar to the Save As dialog always starting from the file's own directory.
>Perhaps you could also add the option to open the File Open dialog from the current file's own directory. That would be similar to the Save As dialog always starting from the file's own directory.
I believe that is the current behavior -- at least, provided the "Remember the last operation directory" option is not checked. Try it.
Regards.
Greg
Yes, it is. The current behavior is to start the File Open Dialog from the current file's own directory, if the "remember last operation directory" option is not checked.
There is however one small bug with this. Changing this setting will only be effective after the next tab change, while I think it should be right-away. So, when closing the preferences dialog, the operation directory (or directories) should be updated as well.