Kwrite adds space at the end of each new line Reproducible: Always Steps to Reproduce: 1. Create new file 2. Add one line with any text 3. Save 4. Ensure that the new line has space at the end Remove spaces option should be disabled.
Qt: 4.8.6 KDE: 4.14.2 KWrite: 4.14.2
Hmm, can't reproduce it. Are you sure it adds space to *each* line? How do you create file? I found that if you create Text File with dolphin in already has one space in it. Qt 4.8.6 KDE 4.14.2-2 KWrite 4.14.2-2 Debian Jessie
You are right, it's a bug in Dolphin, not kate. Once I created a file it contains "\s\n". Can we forward it?
I dunno. Looks like I can change 'product' right here. In fact, all templates in 'Create New' are created from templates (in my system they live in /usr/share/templates/.source). So the fix will be pretty simple: remove space from TextFile.txt. I don't know if template was created with space intentionally or accidentally.
*All items in 'Create New' are created from templates
Thanks. $ pacman -Qo /usr/share/templates/.source/TextFile.txt /usr/share/templates/.source/TextFile.txt belongs to kdebase-lib 4.14.2-1 So each upgrade would probably rewrite that template.
http://websvn.kde.org/trunk/KDE/kdebase/apps/lib/konq/Templates/TextFile.txt?view=log&pathrev=1000000 Revision 56790 - (view) (download) (annotate) - [select for diffs] Modified Fri Jul 14 12:19:25 2000 UTC (14 years, 4 months ago) by hausmann Original Path: trunk/kdebase/kdesktop/init/Templates/TextFile.txt File length: 2 byte(s) Diff to previous 48936 - adding a single-small-micro-space :) , so that after creating a new textfile with Create New->Text File the icon appears correctly
Tested this in stable/master/frameworks compiled from sources with an empty file without extension, an empty file with extension .txt and a file with at least one whitespace with and without extension txt. They have a different Mimetype and a different icon: file with at least one whitespace or empty file with an extension (Filename Pattern) from File Associations settings: icon text-x-plain mimetyp text plain empty file without extension: icon text-x-nfo, mimetyp application-x-zero From my pov this makes absolutely sense. Objections to fixed this bug as invalid?
This sounds incorrect to me. I don't care abut that *** icon, instead I often create new files with Dolphin and have troubles because of those spaces. Doesn't that sound like a real bug? Shouldn't they add an "Empty File" template then?
(In reply to Alexander from comment #9) > This sounds incorrect to me. I don't care abut that *** icon, instead I > often create new files with Dolphin and have troubles because of those > spaces. Doesn't that sound like a real bug? Shouldn't they add an "Empty > File" template then? I found a way to create your own template. You need to: 1. Create directory ~/.kde/share/templates and ~/.kde/share/templates/.source 2. Put file EmptyFile.desktop to ~/.kde/share/templates and EmptyFile to ~/.kde/share/templates/.source You can even overwrite dolphin's default TextFile template if you create your own template with the same name and different source file.
Created attachment 89579 [details] .desktop for empty file
Can't upload EmptyFile because it's empty =) I think you now how to create it and put to mentioned directory.
Please change/correct title, product + component, all are oviously wrong If you want to have an empty text file, test this with an empty template and ensure that a extension for mimetype text/plain is automatically added. Then please file a Review Request at https://git.reviewboard.kde.org/ group kde-baseapps with an empty file lib/konq/Templates/TextFile.txt in the repo kde-baseapps If you want the option for an emtpty file, add an empty file + the corresponding desktop file to the repository kde-baseapps/lib/konq/Templates/ and file a review request as well
As can be seen by the initial commit, the empty space with the newline is intention. This way, new text files are uniquely identified as text files also based on the mime-type. So technically, this is correct I guess. If you want this changed, I would suggest you bring this topic up on kde-devel@kde.org or even kde-core-devel, since it's been like this for > 10 years an basically noone complained about it. Besides, you can change your template and then it'll work on your system. It might even work, if you put it locally into ~/.kde4/share/kde4/templates/.source/TextFile.txt or similar. For me, this is for now a resolved-invalid.
*** This bug has been marked as a duplicate of bug 297003 ***