Despite being a KDE person, I use Evolution as my mail client, including for reading mailing lists and posting patches. Up until now I’ve been doing the latter by attaching patches instead of including them in the message body, to avoid whitespace mangling and linewrap.
But this method is inconvenient sometimes: when you want to comment on a patch posted on the list, portions of that patch (which may include long lines that shouldn’t wrap) will show up in the message body and you can have trouble. This is a problem especially when the poster also sent their patch as attachment, because you will most likely need to copy & paste the patch into your reply window and things will get mangled right there.
Turns out that there is a way to include a patch in the message body in Evolution’s compose window and it will get through unmaimed: select the Preformat option in the paragraph style dropdown, and then paste in your patch or use the Insert -> Text File… option.
Caveat: Older versions of Evolution converted tabs to spaces when pasting text, so you had to insert it from a text file to preserve whitespace. I just tested with version 2.12.3 from Debian (package version 2.12.3-1), and pasting a patch containing tabs worked fine so the bug has been fixed.
Thanks Klaus Kiwi for the tip!
You also need to turn off PGP signing/encryption, otherwise your patch will be encoded as “quoted-printable” which turns trailing spaces into “=20″ – which patch won’t accept.
Hmm.. I’ve been doing that (sending patches at the body of the email) for about too years long, firstly using Evolution and this year I started using Kmail (under Kontact) and it also have the option to avoid breaks on the code. It is (on message menu) Options/Wordwrap.
Yes, selecting Options/Wordwrap is WAY more intuitive than selecting a “Preformat” combobox.
Wordwrap is not the only issue when sending patches, though. Some e-mail clients silently convert tabs to spaces or vice-versa (Lotus Notes, for instance), or deletes whitespace at the end of lines, so one needs to confirm that the e-mail program being used really sends the message body unmangled.
I believe KMail doesn’t have such problems.
I just found this summary of popular e-mail clients and how to send patches with them.