<<< Date Index >>>     <<< Thread Index >>>

Re: Can you force word wrap at a given column?



On 2003-10-05, Seth Williamson <seth@xxxxxxxx> wrote:
> Is there a way to force mutt to always word wrap at, say, column 72, no
> matter the length of the incoming mail?  Some folks using Other Clients
> don't wrap at all, and at least on my box that means that the message
> line extends all the way to the end of the rxvt window before wrapping. 
> I've tried the various wrap tricks from .muttrc but the best I can get
> is a wrap at the end of the window without a broken word, with or
> without markers.

If your shell understands $((<expression>)) and has $COLUMNS
exported, putting this in your .muttrc should work:

    set wrapmargin=`echo $(( $COLUMNS - 72 ))`

If you want to get a little fancier, you can use these three lines
instead.

    macro generic ? ":set wrapmargin=0\n<help>"     "this screen"
    macro pager   ? ":set wrapmargin=0\n<help>"     "this screen"
    message-hook ~A "set wrapmargin=`echo $(( $COLUMNS - 72 ))`"

These wrap message text but leave the help screen text unwrapped.
They don't handle the transition from the pager help screen back to
the pager properly, but other than that, they work well for me.
I think even that could be fixed, but it hasn't been enough of a
problem for me to bother.

HTH,
Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA