mike polniak wrote:
> David Champion wrote:
> > On 2001.01.30, in <[EMAIL PROTECTED]>,
> > "Duncan Watson" <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > I am trying to show messages that attachments in the index. I took a look
> > > at index_format but no luck at first reading. Does anyone have an idea on
> > > how to accomplish this?
> >
> > Can't be done, but I wrote a patch that permits this.
> > http://home.uchicago.edu/~dgc/mutt
>
> I have'nt done this yet, but at first glance it seems doable:
>
> The index_format will show %N a message score. So score your messages by Mutt
> pattern: ~h EXPR for messages which contain EXPR in the message header.
> Now i already use procmail to find attachments by looking at
> the header for 'Content-Type:.*multipart/mixed' which eliminates PGP and
> alternative attachments.
> So just let Mutt match a pattern in the header for Content-Type:?????
> set for some attachment to score accordingly and show it with %N in the index.
OK i am answering my own post. When i try the above, Mutt 1.2.5i
says " ~h is not supported ". So here is how to get Mutt to cooperate and
flag messsages with attachments by putting a message 'score' next to the
status flags in the index:
Mutt does support the pattern '~i ID' which matches the Message-ID:
field. So since i already use procmail to find messages with attachments, i
add another line to the procmail recipe, to replace the original Message-ID:
| formail -i "Message-ID: <attach>".
Now use Mutt message scoring, to score messages which match the pattern
"Message-ID: <attach>". My .muttrc has: folder-hook . "score ' ~i attach' 2"
Now add %N (message score) to the index_format, and the score 2 will
appear in the index. I also edited my pager_format line by adding %i which
is the message id, so that it displays "<attach>" in the pager status line.
HTH
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~