Re: showing mails with attachment in index

2015-06-12 Thread Will Fiveash
On Wed, Jun 10, 2015 at 12:16:25PM +1200, Chris Bannister wrote:
 On Tue, Jun 09, 2015 at 11:26:10AM -0500, Will Fiveash wrote:
  On Tue, Jun 09, 2015 at 02:59:02PM +0200, Orm Finnendahl wrote:
   Hi,
   
is there an option in mutt to display some indicators in the leftmost
   column in the index for mails with attachments or is there a way to
   filter out mails without attachment? I would prefer this indicator to
   only indicate real attachments and not simple multipart text+html
   mails containing more or less the same content. I often have to search
   my mail directories for a certain attachment and this would simplify
   and speed up this process tremendously.
   
   Is there a built in solution for this or has anybody done something
   like a filtering script?
  
  Related to your request I have an index macro which limits the display
  of mail to those messages that contain an attachment:
  
  macro index _a limit~h '\^content-type: +multipart/'\n Display mail 
  w/attachments
 
 Does that display simple multipart text+html attachments? The paragraph
 above says he only wants to display mails with real attachments.

It limits the index display to any message that contains the
'\^content-type: +multipart/' regex in the header.

-- 
Will Fiveash


Re: showing mails with attachment in index

2015-06-09 Thread David Champion
* On 09 Jun 2015, John Niendorf wrote: 
 
 Perhaps I misread this, but how specifically are you using %?X?{%2X}%4c?
 How is this written in your .muttrc file?

My actual index_format is much more complicated, and depends on some
patches, so I can't show that very easily.  But here's an example for
contrast.

This is the stock/built-in $index_format:

set index_format=%4C %Z %{%b %d} %-15.15L (%?l?%4l%4c?) %s

Here's how I would code it differently using attachments:

set index_format=%4C %Z %{%b %d} %-15.15L %?X?{%2X}%4c? %s

-- 
David Champion • d...@bikeshed.us


Re: showing mails with attachment in index

2015-06-09 Thread Michael Tatge
* On Tue, Jun 09, 2015 04:08PM +0200 I (tatg...@gmail.com) muttered:
 * On Tue, Jun 09, 2015 02:59PM +0200 Orm Finnendahl 
 (orm.finnend...@selma.hfmdk-frankfurt.de) muttered:
  is there an option in mutt to display in the index for mails with
  attachments or is there a way to
 
 http://www.mutt.org/doc/devel/manual.html#attachments

also see %X in $index_format

HTH,

Michael
-- 
PGP-Key-ID: EEE7D043
Jabber: in...@jabber.de


Re: showing mails with attachment in index

2015-06-09 Thread David Champion
* On 09 Jun 2015, Orm Finnendahl wrote: 
 
  is there an option in mutt to display some indicators in the leftmost
 column in the index for mails with attachments or is there a way to
 filter out mails without attachment? I would prefer this indicator to

Use %X in index_format to show the attachment count.  You can use it
conditionally to make it look better:

%?X?%2X  ?

I use something like this:

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

which shows me the attachment count if there are attachments, or the
message size otherwise.

Use ~X [number range] to search for them.


 only indicate real attachments and not simple multipart text+html
 mails containing more or less the same content. I often have to search
 my mail directories for a certain attachment and this would simplify
 and speed up this process tremendously.

See this to learn how to tell mutt what attachments you're interested
in:

http://dev.mutt.org/doc/manual.html#attachments

-- 
David Champion • d...@bikeshed.us


Re: showing mails with attachment in index

2015-06-09 Thread John Niendorf

Great - thank you guys!
--
John


Re: showing mails with attachment in index

2015-06-09 Thread John Niendorf

Use %X in index_format to show the attachment count.  You can use it
conditionally to make it look better:

%?X?%2X  ?

I use something like this:

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

which shows me the attachment count if there are attachments, or the
message size otherwise.


Perhaps I misread this, but how specifically are you using %?X?{%2X}%4c?
How is this written in your .muttrc file?

Thank you
--
John


Re: showing mails with attachment in index

2015-06-09 Thread Orm Finnendahl
Thanks David and Michael, (should have found that myself...)

Am Dienstag, den 09. Juni 2015 um 16:40:32 Uhr (+0200) schrieb John Niendorf:
 
 Perhaps I misread this, but how specifically are you using %?X?{%2X}%4c?
 How is this written in your .muttrc file?

I have this now in my .muttrc and it shows the number of attachments
(if any) in the leftmost column:

set index_format=%?X?%2X  ? %T %S %3C %{!%d %b} %-24.24F %s

Apart from the given links, you can find Information about the syntax
of conditionals in format strings here:

http://soc.if.usp.br/manual/mutt/html/manual.html#formatstrings-conditionals

--
Orm


Re: showing mails with attachment in index

2015-06-09 Thread Michael Tatge
* On Tue, Jun 09, 2015 02:59PM +0200 Orm Finnendahl 
(orm.finnend...@selma.hfmdk-frankfurt.de) muttered:
 is there an option in mutt to display in the index for mails with
 attachments or is there a way to

http://www.mutt.org/doc/devel/manual.html#attachments

Michael
-- 
PGP-Key-ID: EEE7D043
Jabber: in...@jabber.de


Re: showing mails with attachment in index

2015-06-09 Thread Will Fiveash
On Tue, Jun 09, 2015 at 02:59:02PM +0200, Orm Finnendahl wrote:
 Hi,
 
  is there an option in mutt to display some indicators in the leftmost
 column in the index for mails with attachments or is there a way to
 filter out mails without attachment? I would prefer this indicator to
 only indicate real attachments and not simple multipart text+html
 mails containing more or less the same content. I often have to search
 my mail directories for a certain attachment and this would simplify
 and speed up this process tremendously.
 
 Is there a built in solution for this or has anybody done something
 like a filtering script?

Related to your request I have an index macro which limits the display
of mail to those messages that contain an attachment:

macro index _a limit~h '\^content-type: +multipart/'\n Display mail 
w/attachments

-- 
Will Fiveash


Re: showing mails with attachment in index

2015-06-09 Thread Chris Bannister
On Tue, Jun 09, 2015 at 11:26:10AM -0500, Will Fiveash wrote:
 On Tue, Jun 09, 2015 at 02:59:02PM +0200, Orm Finnendahl wrote:
  Hi,
  
   is there an option in mutt to display some indicators in the leftmost
  column in the index for mails with attachments or is there a way to
  filter out mails without attachment? I would prefer this indicator to
  only indicate real attachments and not simple multipart text+html
  mails containing more or less the same content. I often have to search
  my mail directories for a certain attachment and this would simplify
  and speed up this process tremendously.
  
  Is there a built in solution for this or has anybody done something
  like a filtering script?
 
 Related to your request I have an index macro which limits the display
 of mail to those messages that contain an attachment:
 
 macro index _a limit~h '\^content-type: +multipart/'\n Display mail 
 w/attachments

Does that display simple multipart text+html attachments? The paragraph
above says he only wants to display mails with real attachments.

-- 
If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the 
oppressing. --- Malcolm X