[arch-general] Content of new text file
Hello, When using Dolphin in KDE4 to *Create New > Text File...* the new file is not empty, it contains a space and a newline character. I have looked for some kind of setting or template file that controls this default and have not been successful. I was wondering if anyone knows how to modify this behavior or can provide a link to a how to. My goal here is to simply create an empty file just like if you used *touch newfile.txt*. Thank you -- Yesterday is history. Tomorrow is a mystery. Today is a gift. That's why its called the present. Headmaster Squall :: The Wired/Section-9 Close the world txen eht nepo $3R14L 3XP3R1M3NT$ #L41N http://twitter.com/headmastersqual
On 07/13/2011 05:00 PM, Squall Lionheart wrote:
Hello,
When using Dolphin in KDE4 to *Create New> Text File...* the new file is not empty, it contains a space and a newline character. I have looked for some kind of setting or template file that controls this default and have not been successful. I was wondering if anyone knows how to modify this behavior or can provide a link to a how to. My goal here is to simply create an empty file just like if you used *touch newfile.txt*.
Thank you
Nope. But if you hear how to solve that, please post back. That's been a peeve of mine with KDE for years now. (Konqueror suffers from the same problem.) DR
Am Wed, 13 Jul 2011 15:00:37 -0600 schrieb Squall Lionheart <headmastersquall@gmail.com>:
When using Dolphin in KDE4 to *Create New > Text File...* the new file is not empty, it contains a space and a newline character. I have looked for some kind of setting or template file that controls this default and have not been successful. I was wondering if anyone knows how to modify this behavior or can provide a link to a how to. My goal here is to simply create an empty file just like if you used *touch newfile.txt*.
Looks like a case for https://bugs.kde.org. Heiko
On Wed, Jul 13, 2011 at 3:37 PM, Heiko Baums <lists@baums-on-web.de> wrote:
Am Wed, 13 Jul 2011 15:00:37 -0600 schrieb Squall Lionheart <headmastersquall@gmail.com>:
When using Dolphin in KDE4 to *Create New > Text File...* the new file is not empty, it contains a space and a newline character. I have looked for some kind of setting or template file that controls this default and have not been successful. I was wondering if anyone knows how to modify this behavior or can provide a link to a how to. My goal here is to simply create an empty file just like if you used *touch newfile.txt*.
Looks like a case for https://bugs.kde.org.
Heiko
If it comes down to it being a bug, I'll file a report. Just want to make sure it's not just a template somewhere first.
On Wed, 13 Jul 2011, Squall Lionheart wrote:
When using Dolphin in KDE4 to *Create New > Text File...* the new file is not empty, it contains a space and a newline character. I have looked for some kind of setting or template file that controls this default and have not been successful. I was wondering if anyone knows how to modify this behavior or can provide a link to a how to. My goal here is to simply create an empty file just like if you used *touch newfile.txt*.
Looks like a case for https://bugs.kde.org.
If it comes down to it being a bug, I'll file a report. Just want to make sure it's not just a template somewhere first.
/usr/share/templates/TextFile.desktop will let you configure it. You can point the URL variable to your desired template file. Pete.
On Wednesday 13 Jul 2011 15:00:37 Squall Lionheart wrote:
When using Dolphin in KDE4 to *Create New > Text File...* the new file is not empty, it contains a space and a newline character.
I wonder if that's to do with MIME types? With a space and a newline, the file is detected by "file" as ASCII text rather than "empty". A single newline is detected as "very short file (no magic)", so probably the space-newline combo is the shortest file that can be automatically detected as text. It might be handy to have the option to "Create New => Empty File" though, although I don't think I've ever needed to do this outside a terminal myself. Paul
On Thu, Jul 14, 2011 at 4:19 AM, Paul Gideon Dann <pdgiddie@gmail.com>wrote:
On Wednesday 13 Jul 2011 15:00:37 Squall Lionheart wrote:
When using Dolphin in KDE4 to *Create New > Text File...* the new file is not empty, it contains a space and a newline character.
I wonder if that's to do with MIME types? With a space and a newline, the file is detected by "file" as ASCII text rather than "empty". A single newline is detected as "very short file (no magic)", so probably the space-newline combo is the shortest file that can be automatically detected as text.
It might be handy to have the option to "Create New => Empty File" though, although I don't think I've ever needed to do this outside a terminal myself.
Paul
I tried what Pete said and that fixed it. The template file is located at /usr/share/templates/.source/TextFile.txt and clearing the contents makes new files appear empty as expected. Thank you Squall
On 07/14/2011 06:19 AM, Paul Gideon Dann wrote:
On Wednesday 13 Jul 2011 15:00:37 Squall Lionheart wrote:
When using Dolphin in KDE4 to *Create New> Text File...* the new file is not empty, it contains a space and a newline character.
I wonder if that's to do with MIME types? With a space and a newline, the file is detected by "file" as ASCII text rather than "empty". A single newline is detected as "very short file (no magic)", so probably the space-newline combo is the shortest file that can be automatically detected as text.
Paul
Ah, that makes a lot of sense now. Thanks for the info. DR
participants (5)
-
David Rosenstrauch
-
Heiko Baums
-
Paul Gideon Dann
-
Peter Lewis
-
Squall Lionheart