SUMMARY "If anything can spoil, it will. "If anything can not spoil, it will either" © Murphy's Law When I need to create a new file in my project in one of the multiple directories in kde4 I used the File -> Open menu command being on one of the file of this directory to open the dialogue with this directory to be the default and the current file selected. Then I updated the name to be a new one and by clicking "Open" obtained a new file. What I especially liked the file was not created at this moment and I can edit it. I can create it physically performing the "Save" operation. In kde5 as I was told this is not more possible due to the new version of the Qt. Now the most natural way is to create a new file with File -> New and then save it with File -> Save or File -> Save As. The problem is that when I open the window to save it the default directory I see in the save dialogue is not the same as the last file selected. BUT IT SHOULD! STEPS TO REPRODUCE 1. Open several file in different directories 2. Create a new one using File -> New 3. Try to save it. OBSERVED RESULT In the "Save File" dialogue the selected directory is not the one, the last selected file was in before the new file was "created". (Indeed it was not created, only Kate has prepared a space for it.) EXPECTED RESULT The "Save File" dialogue must be opened in the directory, the previously used file was in SOFTWARE/OS VERSIONS Operating System: Slackware 15.0-rc3 KDE Plasma Version: 5.23.5 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.3 Kernel Version: 5.15.15 (64-bit) Graphics Platform: X11 Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 31.1 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 630 ADDITIONAL INFORMATION I have nothing against implementation of the old behaviour with File -> Open a new file. ;-) Since it requires less operations and does not touch the disk until the file is prepared.
Yeah, that would be nice to have. We perhaps need to expose either the sorted view list in the KTextEditor API to allow for that or some working directory one shall use for such things in the part. ATM if I am not mistaken the part is providing these actions and has no way to query the right directory, as it has no idea what was the least recently used URL.
Oh, I did miss that this was some "grave" bug, this is an improvement. As said, unfortunately it is not completely trivial to implement.
https://invent.kde.org/utilities/kate/-/merge_requests/567 First part: expose sorted list of views
(In reply to Christoph Cullmann from comment #2) > Oh, I did miss that this was some "grave" bug, this is an improvement. for me it is a grave bug, since I lose a lot of time every day working on my projects. I have regularly to add new files to them. And now it takes 10 times more time. > As said, unfortunately it is not completely trivial to implement. I bet it is much easier to implement allowing to open a new file as it was in kde ;-)
Created attachment 145599 [details] Few clicks to create a new file
(In reply to Christoph Cullmann from comment #3) > https://invent.kde.org/utilities/kate/-/merge_requests/567 > > First part: expose sorted list of views this is related to my bug report https://bugs.kde.org/show_bug.cgi?id=434062
You will not increase my willingness to work on this issue by attaching some videos.
(In reply to Christoph Cullmann from comment #7) > You will not increase my willingness to work on this issue by attaching some > videos. Then assign it to somebody else. Who want the product to be perfect.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/286
Git commit 6c5f489c81f1ae819443b459c4484138200b0b57 by Waqar Ahmed, on behalf of Christoph Cullmann. Committed on 13/02/2022 at 14:53. Pushed by waqar into branch 'master'. use the url of the latest used document for save instead of falling back to current working directory, try to use the last used view url M +27 -10 src/document/katedocument.cpp M +8 -0 src/document/katedocument.h M +5 -0 src/include/ktexteditor/mainwindow.h https://invent.kde.org/frameworks/ktexteditor/commit/6c5f489c81f1ae819443b459c4484138200b0b57