Bug 174034 - Word wrapping in effect even when turned off
Summary: Word wrapping in effect even when turned off
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-11-01 13:45 UTC by William H. Nugent
Modified: 2013-10-07 07:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.1


Attachments
Example of HTML email with 326 characters on a line (2.37 KB, text/plain)
2008-11-10 13:16 UTC, William H. Nugent
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William H. Nugent 2008-11-01 13:45:03 UTC
Version:           1.10.1 (using 4.1.2 (KDE 4.1.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.27-7-generic

Turning the Wordwrap option off in kmail's composer does not stop it from wrapping lines when the message is sent.  Up through KDE 3.5.10 this worked properly.  In 4.1.2 it is a problem (not sure about 4.0.0 through 4.1.1).

The bug rears its ugly head when I'm trying to send a 120 character URL and it is breaking it up into two lines.

First, this is well below RFC 2822's maximum line length of 998 characters so this is not the issue.

Secondly this behaviour is creating a barrier for computer users who are not very literate who either do not understand or have great difficulty cutting and pasting two lines back together to form a valid URL.

	Thank you,
	Bill
Comment 1 William H. Nugent 2008-11-10 13:16:01 UTC
Created attachment 28451 [details]
Example of HTML email with 326 characters on a line

Howdy,

Personally I do not like HTML email because of the large message size.  I just sent an HTML email because I was able to send a link without it wordwrapping and breaking the link.  So I looked at the email source and the longest line was 326 excluding the line feed!  I've attached a copy so you can see.  I modifed a few of the headers to remove email addresses.

Why can't I send a non-HTML email with lines shorter than 998 if HTML emails generated by KMail are not restricted?

Please fix this bug and allow non-HTML emails to be free from word wrapping on lines shorter than 998 characters.  Thank you!
Comment 2 Jaime Torres 2008-11-11 11:42:25 UTC
While kmail 1.10.90 (trunk svn r882080) is able to send and retrieve plain text mails with lines larger than 1000 characters (encoding the mail body in base64), the wordwrap option still does some strange things.

With wordwrap enabled, if I paste a (half the composer window size without spaces) string, type space and paste again, the last pasted string is in the new line. OK.

With wordwrap disabled, if I paste the string, type space and paste again, the last pasted string is in the same line, if I type space and paste again, the last pasted string is a new line.
If I paste the string 10 times (without spaces), it is not wordwraped ever.
If I change the composer window width (srinking it), the lines with spaces are reassigned as if wordwrap is enabled.
Comment 3 Lasse Collin 2010-12-10 12:53:51 UTC
This bug is especially annoying when sending patches. If the patch has long lines, the composer window must be resized to be wide enough to prevent KMail from wordwrapping and thus corrupting the patch when sending. On a small screen you may need to make the composer window wider than the screen. Simply disabling wordwrapping from the Options menu isn't enough.

The bug 238629 seems to be a duplicate of this bug. The bug 219572 might be related to this bug.
Comment 4 Matt Whitlock 2011-08-15 04:04:41 UTC
(In reply to comment #3)
> This bug is especially annoying when sending patches. If the patch has long
> lines, the composer window must be resized to be wide enough to prevent KMail
> from wordwrapping and thus corrupting the patch when sending.

Yes, exactly. And it's not just a problem when sending patches. The bottom line is that KMail should *NEVER* be inserting hard line breaks into messages unless word wrapping is enabled. If a line is wider than the composer window, it can soft-wrap in the composer window, but that is an issue of the *editor*, not the *document*. The size of my composer window should have absolutely no effect on the content of the message I ultimately send.

And just to drive the point home, if I type a long paragraph of text that is greater than 1000 characters, KMail must throw out 7bit content transfer encoding as a possibility and use only quoted-printable or base64. It should *NOT* just throw in a hard line break wherever it wants to. Again, the *document* should be unchanged by whatever transfer encoding happens to be in use.

For the record, the last version of KMail 1 that I used did all of this perfectly right. (In fact it was one of the few MUAs that actually did.)
Comment 5 Martin Walch 2013-10-02 03:30:06 UTC
I just tried to reproduce this bug with KMail 4.11.1, but it seems to be fixed now.

What I could observe:

- Long lines are softwrapped, no more hardwrapped.
- This is also true when saving the email as a draft and reopening it.
- Content-Transfer-Encoding was 7-Bit for long lines (less than 1000 characters), but quoted-printable for *very* long lines.

Looks like it works perfectly now.

Is anybody still hitting this bug?
Comment 6 Matt Whitlock 2013-10-02 09:19:47 UTC
Works perfectly for me now. I'd call this bug licked.
Comment 7 Jaime Torres 2013-10-02 17:05:14 UTC
I guess the problem remains with urls with "-".
For example, try to paste several times:
http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
It will be splittled by address-
sanitizer.
At least it does here to me.
Comment 8 Jaime Torres 2013-10-02 17:08:12 UTC
Ups, sorry. Yes, it works, I had the wordwrap option (with a strange spanish traduction) on.
Comment 9 Jekyll Wu 2013-10-07 07:34:29 UTC
close based upon recent feedback.