I have a file to create, instead of doing this in kate, I run `kate file` And kate reports an error (the close-able dialog on top of editor widget), saying the file could not be loaded, but it's a writable folder, I can save the file with CTRL + S, it's all good, just the message shouldn't be there ;-P Reproducible: Always
*** Bug 316370 has been marked as a duplicate of this bug. ***
Answering the question you made me in 316370 Did you ask for any reason i should see an error when i create a new file? What is the use case? Does any other file editor do that? I've tried all the editors i have installed in my machine and noone of them gives me an error when creating a file from the command line. The only one that gives some info is vi that says "New file" in the status bar. And no, i wouldn't be fine with it going away when doing Ctrl+S, i see why i should be warned that i file i specifically asked to be created does not exist with a big fat ugly error message. I'll put it in a different way, What is the correct way (one that does not give me an error) of creating files now using kate? touch foo && kate foo?
"i see why i should be warned " -> "i don't see why i should be warned " Sorry :_/
No problem ;) In deed, you are right. The issue was more or less: sometimes, if you load remote files, kio can't get them and we got called with non-existing temp file (I guess there are still some places where we need to handle kio errors better in katedocument, anyway). Still, if the url is local anyway, we just skip the warning, if the file is non-existant! I will implement that now.
Git commit 42b281a7ab4e26d3f32a431fe3ede18a23f2685f by Christoph Cullmann. Committed on 02/04/2013 at 08:31. Pushed by cullmann into branch 'master'. skip the "can't open file" error message, if the file is 1) a local file 2) it just doesn't exit this avoids error messages for the usual case like kate <somenewfile.txt> on the command line or file dialog. Still you will get errors if just permissions are not ok for file open or if some kio problems arises with remote urls if somebody likes to do so, I guess this could be even backported M +1 -7 part/buffer/katetextbuffer.cpp M +26 -0 part/document/katebuffer.cpp http://commits.kde.org/kate/42b281a7ab4e26d3f32a431fe3ede18a23f2685f
Hi, I'm not sure if I should open a different bug or not... This change means that if we open a session that contains files that have been removed we get no warning about the missing files...
Hmm, yes, that is true :/ The problem is, the KatePart does the warning, if we want such a warning in that case, I guess Kate Application should warn?
Yep, Maybe the session loader should check and do the warning...
To be honest i think Kåre's bug is a different one from this. If the session loader should check that all the files it is opening as part of a session still exist or not, this is part of the session loader logic, and has nothing to do with plain opening of files (IMHO) so I'd suggest marking this again as resolved and opening a new one to track the session loader behaviour (and add tests for both ;-))
Git commit 744185e20a6562d644652b4804daa8397e0db635 by Christoph Cullmann. Committed on 02/04/2013 at 08:31. Pushed by cullmann into branch 'KDE/4.10'. skip the "can't open file" error message, if the file is 1) a local file 2) it just doesn't exit this avoids error messages for the usual case like kate <somenewfile.txt> on the command line or file dialog. Still you will get errors if just permissions are not ok for file open or if some kio problems arises with remote urls if somebody likes to do so, I guess this could be even backported M +1 -7 part/buffer/katetextbuffer.cpp M +26 -0 part/document/katebuffer.cpp http://commits.kde.org/kate/744185e20a6562d644652b4804daa8397e0db635
According to Kåre this means that we now should show a warning in Kate's session manager. If you agree, we should open a new report for that, right?
Yep, would be ok with that ;)