Bug 90688 - tabs are substituted with spaces in externaly edited message
Summary: tabs are substituted with spaces in externaly edited message
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.7
Platform: unspecified FreeBSD
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-03 06:12 UTC by mi+kde
Modified: 2007-09-14 12:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mi+kde 2004-10-03 06:12:36 UTC
Version:           1.7 (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.4.2 [FreeBSD] 20040728
OS:                FreeBSD (i386) release 5.2-CURRENT

In addition to the mysterious binary symbols randomly inserted into a file created for the external message-editor (bug 79767 -- first reported for KDE-3.2.1 is still with us), the latest release of kmail offers a new bug for the users of external editors -- the tabs will be converted to spaces if the external editor is re-launched.

If I'm unhappy with the composed message, and the external editor is launched again, all of the tabs I entered will be replaced by spaces -- one space per tab.
Comment 1 Christian Bornträger 2004-10-06 11:25:40 UTC
The bug is not limited to external editors.

Even with the internal editor tabs are always replaced by white spaces as soon as you file the mail into the draft folder or send the mail.
To reproduce:
create a mail:
<TAB><TAB>lalala

send the mail to yourself and see in your sent folder:
<SPACE><SPACE>lalala

I consider this problem very critical. Its now impossible to send working patches inline (as requested by several mailing lists like LKML) without breaking the indentation.
By the way, I do not need html edit functionality, I need properly working text messages. 

Tested on Debian unstable i386 kmail 1.7.
Comment 2 Edwin Schepers 2004-10-06 17:45:30 UTC
Hi,
This issue should be solved in cvs' version of Qt.
Which version of Qt are you using?
Comment 3 Christian Bornträger 2004-10-06 18:40:00 UTC
I am using qt 3.3.3 from debian unstable. 
I could trigger an bug to the debian qt maintainer to take this fix. Is there a link to the changelog? I am not able to find a public qt cvs server.

cheers

Christian

Comment 4 Arnd Bergmann 2004-10-08 18:33:47 UTC
I can confirm that the problem is solved by installing qt-copy_040924.tar.bz2
from kde.org. Unfortunately, I could not find any suspicious diff between 3.3.3 and that version either.
Comment 5 Edwin Schepers 2004-10-13 20:02:20 UTC
Hi,
The following came from Trolltech :
This was a bug introduced in Qt 3.3.3 and fix will be part of the next
maintenance release Qt 3.3.4, which should be out within a couple of
months.
Comment 6 mi+kde 2004-10-13 22:51:14 UTC
Can we ask Trolltech for a patch meanwhile?
Comment 7 Lionel 2004-10-22 09:37:53 UTC
A patch would be welcome indeed: it is impossible to forward inline a PGP/GPG signed portion of a mail without screwing up the signature if the original message contained even a single a tab!
Comment 8 Bjorn Helgaas 2004-11-16 19:39:50 UTC
I think this is a duplicate of http://bugs.kde.org/show_bug.cgi?id=89410 (editor loses formatting on various actions), which contains a one-line patch.

The patch seems to have been in KDE cvs for a couple months (see revisions 1.70 and 1.71 of http://webcvs.kde.org/cgi-bin/cvsweb.cgi/qt-copy/src/kernel/qrichtext.cpp).
Comment 9 Christian Bornträger 2004-11-17 23:26:34 UTC
Björn, you are right. 
This small patch seems to fix this issue.
I am going to trigger the debian maintainer to include this patch.