[BUGS] format=flawed (was: Why is my mail being horribly newlined?)

Andrew Reilly andrew at areilly.bpc-users.org
Sat Dec 15 10:13:38 EST 2007


Hi Jonathan,

On Fri, 14 Dec 2007 22:40:53 +1100
jonathan michaels <jlm at caamora.com.au> wrote:

> On Fri, Dec 14, 2007 at 08:07:10PM +1100, Andrew Reilly wrote:
> > On Fri, Dec 14, 2007 at 05:49:44PM +1100, Greg 'groggy' Lehey wrote:
> > > On Friday, 14 December 2007 at  9:38:45 +1100, Andrew Reilly wrote:
> > > > On Fri, Dec 14, 2007 at 07:11:12AM +1100, Jerahmy Pocott wrote:
> 
> > english text it hardly matters at all.  Sure, it's not much
> > work to have nicely-formatted plain-text paragraphs in vi or
> > emacs, but Mail.app doesn't give you access to either of those.
> 
> ummm i think its about time i upgraded from ee to some thing a
> bit more flexible, grin.

:-)  I'm afraid that I already knew both vi and emacs before I
discovered ee (in FreeBSD), and could never see the point.  I
don't think that I've used it for more than thirty seconds, all
up...

> "nicely-formatted plain-text paragraphs in vi or emacs,"
> 
> this equiring mind would like to know how, please, i'm not sure
> which is easier to get my head around, thoufh i think emacs is
> easier to grok, but vi is easier to use but  nightmare to
> learn.

Well emacs knows the "fill-paragraph" command already, or at
least when it's in any mode that knows about paragraphs.  It's
usually mapped to Meta-q.

Vi doesn't know about filling paragraphs, but it does know about
paragraphs, and it has really good integration with the Unix
environment, and the Unix environment (on BSD at least) has
"par", which you can look up.  If you're keen, there's also "fmt"
in ports... hold on, no, that's in base FreeBSD too, now.  How
about that!  They both have various options, and fmt is cleverer
than par, because it will preserve what it identifies to be
common prefixes, so you can use it to re-fill someone else's
badly-formatted paragraphs while maintaining the line of "> "
down the side.  So to bring vi's knowledge of paragraphs and
par/fmt's ability to format them together, you put something like:
map q !}par 64
in your .exrc file.  Then you can get to the front of the
paragraph that isn't nicely formatted, press q, and bingo: it'll
be formatted.

(Incidentally, correctly handling plain-text e-mail style block
quotation properly is one of Apple Mail.app's great strengths,
IMO.  There's no other GUI mail program (or text, for that
matter) that really grocks "levels of quotation" the way Mail.app
does.  (Pan gets close, but only in the viewer, not in the
composition window.)  Say you want to fix someone else's broken
quotation, or reply to the parent message, rather than directly
to the current message's author, just select the paragraph, then
Format|Quote Level|Increase or |Decrease.  Emacs can probably do
that, but I don't know of a handy way in vi, other than search
and replace with a front-of-line regexp.  I've been tempted,
on and off, to see how close to Mail.app GNUMail is, but I'm
afraid that I haven't been able to successfully get it running,
yet.  It needs a lot of GNUStep magic to be installed and
working.)

-- 
Andrew


More information about the BUGS mailing list