On Thu, Jan 24, 2002 at 05:49:27PM +0100, Nick Wilson wrote:

> * and then Gary Johnson blurted....
> > It depends on how you have mutt configured.  I have my mailcap file and
> > auto_view command set up to display HTML attachments as plain text in
> > mutt's pager and have display_filter set to remove the "[-- ... --]"
> > lines that mutt adds.  Except for a slight delay as the longer
> 
> Could you post that line?
> That /is/ kind of annoying seeing those lines.

I use the following set of folder-hooks.

    folder-hook .           set display_filter=mail-to-filter
    folder-hook +Incoming/. 'set display_filter="sed '\''/^\\[-- .* --]$/d'\''"'
    folder-hook +Lists/.    'set display_filter="sed '\''/^\\[-- .* --]$/d'\''"'
    folder-hook '!'         set display_filter=mutt_gen_disp_filter

Unless otherwise specified, I use the 'mail-to-filter' script to compress
excessively long distribution lists.  (Lists of over a hundred
recipients are common where I work.)

The middle two hooks cover all the mailing lists I read, where it is
common for people to send HTML messages, but uncommon for them to send
odd attachments.  (Figuring out how to quote mutt commands properly is
so much fun!)

For my main mailbox ('!'), where I might receive anything, I use a
catch-all script, 'mutt_gen_disp_filter', which includes a sed script to
selectively remove the "[-- " lines:

    #!/bin/sh
    # mutt_gen_disp_filter - general display filter for mutt

    mail-to-filter |
    sed '
            /^\[-- Autoview using .* --]$/d
            /^\[-- Attachment .* --]$/d
            /^\[-- Type: .* --]$/d
    '

> Saying that though I would still like an idicator that it is indeed html
> mail.

You could easily add a command like the following to the sed script to
replace the HTML autoview line with an indicator more to your liking.

    s/^\[-- Autoview using .*html.*/[This message is of type text/html]\
    /

The backslash at the end of the first line followed by the forward slash
on the next line to terminate string adds a newline between the HTML
indicator string and the message body.

Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to