Bug 344267 - Save new files in Project directory by defaults (Kate Projects Plugin)
Summary: Save new files in Project directory by defaults (Kate Projects Plugin)
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: junior-jobs, usability
Depends on:
Blocks:
 
Reported: 2015-02-17 09:07 UTC by EGD
Modified: 2019-05-19 15:05 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EGD 2015-02-17 09:07:26 UTC
I use Kate Projectmanager Plugin.
Please, set default directory in Save As dialogue as current project directory.

Reproducible: Always

Steps to Reproduce:
1. use KPMP
2. open project
3. create new file
4. Save As

Actual Results:  
~/Documents

Expected Results:  
current project directory
Comment 1 Michal Humpula 2015-02-17 17:19:04 UTC
Yeah, that would so much usefull: +1
Comment 2 Michal Humpula 2015-02-18 16:14:48 UTC
Not sure about that junior-job keyword though. The save dialog is opened by ktexteditor I think and that one has no idea about the project plugin. IMHO you need to get the information about project path to ktexteditor, that means extending the KTE interface in sane way.
Comment 3 Dominik Haumann 2015-03-26 18:04:59 UTC
@EGD: KPMP? That means the "Kate Project Management Plugin" from KDE3? (see http://kde-apps.org/content/show.php?content=42653) ?

If this is the case, we removed this plugin in KDE 4. It was replaced by the Projects plugin later. Meanwhile we arrived kind of at KDE 5... The KPMP plugin is unmaintained and not developed anymore.
Comment 4 EGD 2015-03-26 18:16:45 UTC
(In reply to Dominik Haumann from comment #3)
> @EGD: KPMP? That means the "Kate Project Management Plugin" from KDE3? (see
> http://kde-apps.org/content/show.php?content=42653) ?

No, i mean Projects plugin from KDE4. Sorry.
Comment 5 Dominik Haumann 2015-03-29 08:59:03 UTC
> The save dialog is opened by ktexteditor I think and that one has no idea
> about the project plugin. IMHO you need to get the information about project
> path to ktexteditor, that means extending the KTE interface in sane way.

In any case, all plugins are KTextEditor plugins. These plugins are managed on KTextEditor level by the plugin manager, so yes, on KTextEditor level we can query for whether the projects plugin is loaded, and if so, get infos from the plugin.

Question is, though, whether it's really what you want:
- in case you are saving an already existing file through Save As: I would expect the dialog to be in the folder as the current file.
- Save As for unsaved buffers, well yes, in that case it may make sense.
Comment 6 Michal Humpula 2015-03-29 09:22:35 UTC
> on KTextEditor level we can query for whether the projects plugin is loaded,
> and if so, get infos from the plugin.

Wouldn't that violate the "interface direction"? Right now the KTE doesn't know anything about the plugins internal behaviour. It just provides methods to manipulate with the KTE. It doesn't know about any sort of "grouping" of opened documents (be it these docs belongs to same directory or to same project).

What about extending the plugin interface so that the plugin can tell KTE to use
the plugin's saveAs/open functionality instead of the build-in one?
Comment 7 Francisco Fernandes 2015-03-30 12:42:59 UTC
> Question is, though, whether it's really what you want: 
> - in case you are saving an already existing file through Save As: I would expect the dialog to be in the folder as the current file. 
> - Save As for unsaved buffers, well yes, in that case it may make sense.

I think that @EGD meant for unsaved buffers. As you described, when you do a 'Save As' from an existing file, it auto detects the current folder, which is
the desired behaviour. For new files, at least for me, it always goes to the $HOME folder and I have to navigate to the project dir to save in the proper place.
Comment 8 EGD 2015-03-31 16:56:13 UTC
(In reply to Francisco Fernandes from comment #7)
> I think that @EGD meant for unsaved buffers.

yes
Comment 9 Christoph Cullmann 2019-05-19 15:05:40 UTC
Dear user, this wish list item is now closed, as it wasn't touched in the last year and no contributor stepped up to implement it.

The Kate/KTextEditor team is small and we can just try to keep up with fixing bugs.

Therefore wishes that show no activity for a years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users.
If you want your feature to be implemented, please step up to provide some patch for it.

If you think it is really needed, you can reopen your request, but keep in mind,
if no new good arguments are made and no people get attracted to help out to implement it,
it will expire in a year again.

We have a nice website https://kate-editor.org that provides all the information needed to contribute, please make use of it.

Patches can be handed in via https://phabricator.kde.org/differential/

Greetings
Christoph Cullmann