[Enigmail] Wrap text before sending?
Andrew Ferguson
owsla at princeton.edu
Wed Aug 11 18:05:13 EDT 2004
Hi -
First off, I'm a (pretty) happy Enigmail user on Thunderbird in Mac OS
X. My only problem is the miserable way it rewraps messages when
sending. I've disabled everything to do with format=flowed (including in
user.js), but it still produces output like this:
> OK, don't bother us with the error then, but the IPC package is the core
> of engmime. You won't get very far without it. IPC handles passing info
> back and forth from Mozilla to gpg.
Thunderbird can do much better. Simply doing Edit->Rewrap before I send
the message fixes it, as you can see:
> OK, don't bother us with the error then, but the IPC package is the
> core of engmime. You won't get very far without it. IPC handles
> passing info back and forth from Mozilla to gpg.
But I don't want to have to remember to do this every time I want to
send a message. So, I propose the following fix:
After line 1074 in enigmailMsgComposeOverlay.js add:
if (!(sendFlags & ENIG_ENCRYPT)) {
var editor = gMsgCompose.editor.QueryInterface(nsIPlaintextEditorMail);
editor.wrapWidth=wrapWidth-2; // prepare for the worst case: a 72
// char's long line starting with '-'
editor.rewrap(false);
}
This is basically a copy & paste of the code 15 lines higher that
rewraps the message if it's an HTML e-mail and wrapHtmlBeforeSend is set
in the preferences. For that matter, there could be a wrapTextBeforeSend
if needed.
Could a developer look at / think this over? I'd really appreciate if
Enigmail did proper text wrapping for non-format=flowed mail. I can work
this up into a proper patch and test it if somebody with more experience
gives the ok. This is my first Mozilla-type work so I haven't setup a
build/testing environment of my own.
Thanks,
Andrew
--
Andrew Ferguson - owsla at princeton.edu
http://www.princeton.edu/~owsla/
http://www.phstower.org/
More information about the Enigmail
mailing list