Re: index_format - indicate which email has attachment

2007-10-06 Thread Joseph
On 10/06/07 14:47, David Champion wrote:
> These defaults are installed when you build from source.  Are you
> using a distributed package?  If so, sounds like someone oopsed.

Thanks David and Garry for the index input, it works as you described:
I likes Garry's solution: %?X?%X& ?
It is perfect.

Yes, I compiled from Gentoo distribution, it is provided as an ebuild 
(as all other packages).
No, they are not spoiling us with regards to muttrc, for example the 
default muttrc setup is:

set mbox_type=Maildir
set folder=~/.maildir
set spoolfile=~/.maildir/
set record=~/.maildir-sent/
set move=no

set index_format="%4C %Z %{%b %d} %-16.16L  %s"

and that is all. Though, there is a pointer to Gentoo Mutt Guide which 
is very, very good example in explaining the basics and if a user want 
something fancy we need to pull our sleeves up get to work :-)

Though they have one advantage, I just noticed that Gentoo provide 
"mutt-sidebar" as a flag, so all I need to do is to re-compile it with 
that flag and copy the settings from: 
http://www.lunar-linux.org/index.php?option=com_content&task=view&id=44

Works like a charm, and happy with it :-)
 
-- 
#Joseph
GPG KeyID: ED0E1FB7


Re: index_format - indicate which email has attachment

2007-10-06 Thread David Champion
> Thanks Dave for the example, no my muttrc did not come with these 
> defaults, and yes it works now.

These defaults are installed when you build from source.  Are you
using a distributed package?  If so, sounds like someone oopsed.


> It displays attachments but is there a way to suppress the "0" if there is 
> no attachment.

What Gary said. :)

Personally I use something akin to this:

%?X?{%2X}&%4c?

Which shows me attachment count if there are attchments, or
total message size othewise.

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago
 "Polka music needs to prevail."   John Ziobrowski, Polka America Corporation


Re: index_format - indicate which email has attachment

2007-10-06 Thread Gary Johnson
On 2007-10-06, Joseph <[EMAIL PROTECTED]> wrote:

> Thanks Dave for the example, no my muttrc did not come with these 
> defaults, and yes it works now.
> 
> It displays attachments but is there a way to suppress the "0" if there is 
> no attachment.

The 'index_format' accepts conditional elements, so something like 
this will work,

   %?X?%X?

or if you want a space in place of the 0 instead of nothing, this:

   %?X?%X& ?

Regards,
Gary


Re: index_format - indicate which email has attachment

2007-10-06 Thread Joseph
On 10/06/07 13:44, David Champion wrote:
> Right.  You can type ":attachments ?" (no quotes) into mutt to see
> what settings it has now.  The defaults come from the system
> muttrc:
> 
> Current attachments settings:
> 
> attachments +A */.*
> attachments -A text/x-vcard
> attachments -A application/pgp.*
> attachments -A application/x-pkcs7-.*
> attachments -A message/external-body
> attachments +I text/plain
> attachments -I message/external-body
> 
> These basically mean that "attachments" with a content-disposition
> of "inline" will not be counted as attachments, unless they are
> content-type text/plain; and all messages with a content-disposition
> of "attachment" will be counted, except for the four types listed
> (pgp signatures, vcards, and external-body messages).
> 
> Perhaps your message with an attachment doesn't qualify under these
> rules.  But that's why you can change the rules. :)

Thanks Dave for the example, no my muttrc did not come with these 
defaults, and yes it works now.

It displays attachments but is there a way to suppress the "0" if there is 
no attachment.

-- 
#Joseph
GPG KeyID: ED0E1FB7



Re: index_format - indicate which email has attachment

2007-10-06 Thread David Champion
> Did you properly configure all 'attachment' commands (see the system Muttrc 
> file for examples) or did you just add '%X' to $index_format?
>
> You have to tell mutt what an you consider an attachment before %X does 
> display the counts in $index_format.

Right.  You can type ":attachments ?" (no quotes) into mutt to see
what settings it has now.  The defaults come from the system
muttrc:

Current attachments settings:

attachments +A */.*
attachments -A text/x-vcard
attachments -A application/pgp.*
attachments -A application/x-pkcs7-.*
attachments -A message/external-body
attachments +I text/plain
attachments -I message/external-body

These basically mean that "attachments" with a content-disposition
of "inline" will not be counted as attachments, unless they are
content-type text/plain; and all messages with a content-disposition
of "attachment" will be counted, except for the four types listed
(pgp signatures, vcards, and external-body messages).

Perhaps your message with an attachment doesn't qualify under these
rules.  But that's why you can change the rules. :)

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago
 "Polka music needs to prevail."   John Ziobrowski, Polka America Corporation


Re: index_format - indicate which email has attachment

2007-10-06 Thread Rocco Rutte

Hi,

* Joseph [07-10-06 11:12:46 -0600] wrote:

On 10/06/07 11:44, Christian Ebert wrote:



%X
  number of qualifying MIME parts in this part and its children
  (please see the ``attachments'' section for possible speed
  effects)



Yes, I was playing with it but when I set my index like this it displays 
"0" on all files, even the one with attachments.



set index_format="%4C %Z %d %X %-15.15n (%?l?%4l&%4c?) %s"


Did you properly configure all 'attachment' commands (see the system 
Muttrc file for examples) or did you just add '%X' to $index_format?


You have to tell mutt what an you consider an attachment before %X does 
display the counts in $index_format.


Rocco


Re: index_format - indicate which email has attachment

2007-10-06 Thread Joseph
On 10/06/07 11:44, Christian Ebert wrote:
> * Joseph on Saturday, October 06, 2007 at 00:48:00 -0600
> > Is it possible to show in index display which email has an attachment?
> > I was looking for a solution but it seems to me I need to install a 
> > patch in order to show this information in index_format.
> 
> Your version of Mutt should already have the patch included.
> Experiment with %X in index format, and have a look at the, you
> know, fine manual:
> 
> %X
>   number of qualifying MIME parts in this part and its children
>   (please see the ``attachments'' section for possible speed
>   effects)
> 

Yes, I was playing with it but when I set my index like this it displays 
"0" on all files, even the one with attachments.

set index_format="%4C %Z %d %X %-15.15n (%?l?%4l&%4c?) %s"


-- 
#Joseph
GPG KeyID: ED0E1FB7


Re: index_format - indicate which email has attachment

2007-10-06 Thread Christian Ebert
* Joseph on Saturday, October 06, 2007 at 00:48:00 -0600
> Is it possible to show in index display which email has an attachment?
> I was looking for a solution but it seems to me I need to install a 
> patch in order to show this information in index_format.

Your version of Mutt should already have the patch included.
Experiment with %X in index format, and have a look at the, you
know, fine manual:

%X
  number of qualifying MIME parts in this part and its children
  (please see the ``attachments'' section for possible speed
  effects)

c
-- 
Python Mutt utilities 


index_format - indicate which email has attachment

2007-10-05 Thread Joseph
Is it possible to show in index display which email has an attachment?
I was looking for a solution but it seems to me I need to install a 
patch in order to show this information in index_format.

This page indicate I would need this patch in order to show this 
information:
http://home.uchicago.edu/~dgc/mutt/#attach

-- 
#Joseph
GPG KeyID: ED0E1FB7