X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f4a3744dd23595be0442c4c035916adfcb0e496f..10ecbaa654e8666b47b6069b8b7476901e864a91:/docs/contrib/replyfilter diff --git a/docs/contrib/replyfilter b/docs/contrib/replyfilter index cbb8fff1..c7d46439 100755 --- a/docs/contrib/replyfilter +++ b/docs/contrib/replyfilter @@ -10,11 +10,16 @@ # # - Put the path to this program in your .mh_profile under formatproc: # -# formatproc: replyfilter +# formatproc: replyfilter # -# - Create a mhl reply filter that consists of the following line: +# or invoke repl with "-fmtproc replyfilter". # -# body:nocomponent,format,nowrap,formatarg="%(trim{content-type})%(putstr)",formatarg="%(trim{content-transfer-encoding})%(putstr)",formatarg=">" +# - Create an mhl reply filter that consists of the following line: +# +# body:nocomponent,format,nowrap,formatarg="%(trim{content-type})%(putstr)",formatarg="%(trim{content-transfer-encoding})%(putstr)",formatarg=">" +# +# By default, repl will look for the mhl reply filter by the name +# "mhl.reply", but it will look elsewhere if the -filter switch is given. # # To decode this a bit: # @@ -23,8 +28,8 @@ # component prefix of ">" as a quote character, but we're # going to have replyfilter do that). # nowrap - Don't wrap lines if they exceed the column width -# formatarg - Arguments to fmtproc. The first argument is the value of -# the Content-type header; the second is the value of the +# formatarg - Arguments to formatproc. The first argument is the value +# of the Content-type header; the second is the value of the # Content-Transfer-Encoding header. The last "formatarg" # is used as your quoting prefix. Replace it with whatever # you want. @@ -68,11 +73,11 @@ $outcharset = 'utf-8'; $maxcolwidth = 78; # -# Out HTML converter program & arguments +# Out HTML converter program & arguments. charset will be appended # @htmlconv = ('w3m', '-dump', '-cols', $maxcolwidth - 2, '-T', 'text/html', - '-O', $outcharset); + '-O', $outcharset, '-I'); die "Usage: $0 Content-type content-transfer-encoding quote-prefix\n" @@ -400,7 +405,8 @@ sub process_html (*$$;$) # Exec our converter # - exec (@htmlconv) || + my @conv = (@htmlconv, $charset); + exec (@conv) || die "Unable to exec $filterprogram: $!\n"; } else { die "Fork for $htmlconv[0] failed: $!\n";