Pre-wrap lines in Mail.app

Jun 08, '02 11:28:55AM

Contributed by: peyote

Left to its own devices, Mail.app tends to break long lines in messages in stupid places (I've seen it do it at apostrophes, colons, all sorts of weird places). Depending on the mail client the recipient is using, this can make the sender look rather illiterate. One workaround is to re-flow paragraphs yourself using fmt.

First install the incredibly useful TextExtras package as described in this hint. Then define a "user pipe" which sends the current selection to fmt and replaces the current selection with the result by editing your .TEUserPipes.plist file. Mine looks like this. Note that it binds this pipe to Command-\.

Now in any Cocoa text editor you can highlight some text, hit Command-\ and it will get reformatted so the lines are between 65 and 75 chars long (fmt's default setting). Obviously this method can be easily extended to call any of the other command line text processing tools from inside a Cocoa window.

That's useful in itself, but to be honest I'd love to be told a better way of coping with this line length madness.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2002060811285560