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

Re: How to display format=flowed?



* On 2005.10.12, in <22232.1129119346@xxxxxxxxxxxxx>,
*       "Daniel Hertrich" <daniel.hertrich@xxxxxx> wrote:
>
> Is there any way to let mutt display messages nicely on displays _narrower_
> than 80 columns?

I regularly get non-format=flowed mail with no line breaks in the
paragraphs.  My fix for this might help you as well:


macro index   \Cr     "<enter-command>set 
display_filter=\"display-filter\"<enter><display-message><enter-command>unset 
display_filter<enter>" "Reflow formatting"

$ cat bin/display-filter
#!/usr/bin/env perl
##
## a display filter for mutt.
##

use strict;

my $cols = `tput cols`; chomp $cols;

#my $fmt = "fmt -w$cols";
my $fmt = "par w${cols}Th";

# Skip header block
while (<STDIN>) {
        print;
        last if (/^$/);
}

# Reflow the body
open (OUT, "| $fmt") or *OUT = *STDOUT;
while (<STDIN>) {
        print OUT "$_";
}
close(OUT);

-- 
 -D.    dgc@xxxxxxxxxxxx        NSIT    University of Chicago