At revision 4720.
I'm trying to understand the Tools->Configuration Files Edit/Save behavior, so that I can mimic that in a plugin that does the same thing for template files. When I select *snippets.conf* from the *Configuration Files*submenu, and there is no *snippets.conf* in *~/.config/geany (app->configdir)*, the default file from */usr/share/geany (app->datadir)* is obviously opened, but a Status message is issued indicating that the file is opened in *~/.config/geany (app->configdir)*. I take this to mean that the override convention (files in *configdir* overriding files of the same name in *datadir)* is being enforced in the editor. However, when I save the modified file, using either the *Save* icon or * File->Save*, I am put into a file save dialog, as if I had selected* File->Save As*.
Is this the specified behavior? Having the *File->Save As* dialog appear when *Save* is specified is confusing and inconsistent. It seems to me that if the override convention is being enforced, selecting *Save* should write the modified file to the location reported in the Status window without question, and the save location dialog only offered specifically when *Save As* is selected. If the override convention is not being enforced in the editor, then the Status message is misleading. The manual does not refer specifically to this behavior, only to the fact that *.conf* can be manually copied to *configdir* and modified, and will then override the default file. I think it is more consistent to have the editor enforce the override file location policy by default on *Save*, allow *File->Save As *to be used as an option at the user's discretion, and state the override file location policy and the editor's enforcement of such clearly in the manual.
- tony
On Tue, Mar 2, 2010 at 10:59 PM, Tony Rick tonyr42@gmail.com wrote:
At revision 4720.
I'm trying to understand the Tools->Configuration Files Edit/Save behavior, so that I can mimic that in a plugin that does the same thing for template files. When I select *snippets.conf* from the *Configuration Files*submenu, and there is no *snippets.conf* in *~/.config/geany (app->configdir)*, the default file from */usr/share/geany (app->datadir)* is obviously opened, but a Status message is issued indicating that the file is opened in *~/.config/geany (app->configdir)*. I take this to mean that the override convention (files in *configdir* overriding files of the same name in *datadir)* is being enforced in the editor. However, when I save the modified file, using either the *Save* icon or * File->Save*, I am put into a file save dialog, as if I had selected* File->Save As*.
Is this the specified behavior? Having the *File->Save As* dialog appear when *Save* is specified is confusing and inconsistent. It seems to me that if the override convention is being enforced, selecting *Save* should write the modified file to the location reported in the Status window without question, and the save location dialog only offered specifically when *Save As* is selected. If the override convention is not being enforced in the editor, then the Status message is misleading. The manual does not refer specifically to this behavior, only to the fact that *.conf
- can be manually copied to *configdir* and modified, and will then
override the default file. I think it is more consistent to have the editor enforce the override file location policy by default on *Save*, allow *File->Save As *to be used as an option at the user's discretion, and state the override file location policy and the editor's enforcement of such clearly in the manual.
Here's a simple patch that modifies the Save behavior for config files edited from the Tools->Configuration Files submenu for your consideration. Config files that are read from the geany data directory (because they did not already exist in the local config directory) will be saved to the local config directory by default.
- tony
On Wed, 3 Mar 2010 14:08:36 -0800, Tony wrote:
On Tue, Mar 2, 2010 at 10:59 PM, Tony Rick tonyr42@gmail.com wrote:
At revision 4720.
I'm trying to understand the Tools->Configuration Files Edit/Save behavior, so that I can mimic that in a plugin that does the same thing for template files. When I select *snippets.conf* from the *Configuration Files*submenu, and there is no *snippets.conf* in *~/.config/geany (app->configdir)*, the default file from */usr/share/geany (app->datadir)* is obviously opened, but a Status message is issued indicating that the file is opened in *~/.config/geany (app->configdir)*. I take this to mean that the override convention (files in *configdir* overriding files of the same name in *datadir)* is being enforced in the editor. However, when I save the modified file, using either the *Save* icon or * File->Save*, I am put into a file save dialog, as if I had selected* File->Save As*.
Is this the specified behavior? Having the *File->Save As* dialog appear when *Save* is specified is confusing and inconsistent. It seems to me that if the override convention is being enforced, selecting *Save* should write the modified file to the location reported in the Status window without question, and the save location dialog only offered specifically when *Save As* is selected. If the override convention is not being enforced in the editor, then the Status message is misleading. The manual does not refer specifically to this behavior, only to the fact that *.conf
- can be manually copied to *configdir* and modified, and will then
override the default file. I think it is more consistent to have the editor enforce the override file location policy by default on *Save*, allow *File->Save As *to be used as an option at the user's discretion, and state the override file location policy and the editor's enforcement of such clearly in the manual.
Here's a simple patch that modifies the Save behavior for config files edited from the Tools->Configuration Files submenu for your consideration. Config files that are read from the geany data directory (because they did not already exist in the local config directory) will be saved to the local config directory by default.
Thanks, committed. I just changed the actual real_path to the target file.
Regards, Enrico
On Sun, 7 Mar 2010 18:35:10 +0100, Enrico wrote:
On Wed, 3 Mar 2010 14:08:36 -0800, Tony wrote:
On Tue, Mar 2, 2010 at 10:59 PM, Tony Rick tonyr42@gmail.com wrote:
At revision 4720.
I'm trying to understand the Tools->Configuration Files Edit/Save behavior, so that I can mimic that in a plugin that does the same thing for template files. When I select *snippets.conf* from the *Configuration Files*submenu, and there is no *snippets.conf* in *~/.config/geany (app->configdir)*, the default file from */usr/share/geany (app->datadir)* is obviously opened, but a Status message is issued indicating that the file is opened in *~/.config/geany (app->configdir)*. I take this to mean that the override convention (files in *configdir* overriding files of the same name in *datadir)* is being enforced in the editor. However, when I save the modified file, using either the *Save* icon or * File->Save*, I am put into a file save dialog, as if I had selected* File->Save As*.
Is this the specified behavior? Having the *File->Save As* dialog appear when *Save* is specified is confusing and inconsistent. It seems to me that if the override convention is being enforced, selecting *Save* should write the modified file to the location reported in the Status window without question, and the save location dialog only offered specifically when *Save As* is selected. If the override convention is not being enforced in the editor, then the Status message is misleading. The manual does not refer specifically to this behavior, only to the fact that *.conf
- can be manually copied to *configdir* and modified, and will then
override the default file. I think it is more consistent to have the editor enforce the override file location policy by default on *Save*, allow *File->Save As *to be used as an option at the user's discretion, and state the override file location policy and the editor's enforcement of such clearly in the manual.
Here's a simple patch that modifies the Save behavior for config files edited from the Tools->Configuration Files submenu for your consideration. Config files that are read from the geany data directory (because they did not already exist in the local config directory) will be saved to the local config directory by default.
Thanks, committed. I just changed the actual real_path to the target file.
Recently I reverted the patch as it actually does it wrong, your way and mine as well. Setting the real_path attribute manually does the trick about not showing the Save As dialog but it also causes misleading 'file not found' dialogs when Geany checks the file for external on-disk changes.
I discussed this issue a bit with Nick and we came to the conclusion, at least for now, that it is better to keep the old behaviour. This way the user is explicitly told that he/she is saving a new file which might be a good idea. And for those users who already knew, it's just only one more click.
Thanks for your efforts anyway.
Regards, Enrico
2010/3/20 Enrico Tröger enrico.troeger@uvena.de
On Sun, 7 Mar 2010 18:35:10 +0100, Enrico wrote:
Recently I reverted the patch as it actually does it wrong, your way and mine as well. Setting the real_path attribute manually does the trick about not showing the Save As dialog but it also causes misleading 'file not found' dialogs when Geany checks the file for external on-disk changes.
I discussed this issue a bit with Nick and we came to the conclusion, at least for now, that it is better to keep the old behaviour. This way the user is explicitly told that he/she is saving a new file which might be a good idea. And for those users who already knew, it's just only one more click.
Thanks for your efforts anyway.
Regards, Enrico
No prob. Your call, I just suggest.
- tony