=> On [2011-11-08 12:03:50 -0500]:
 Ed Blackman Said: 
> On Tue, Nov 08, 2011 at 02:13:05PM +0100, Gregor Zattler wrote:
> >It's not possible to change the index format for individual
> >emails in the index but you can colour different email entries
> >differently.
> 
> Actually, it is.  If you set index_format to a shell command that
> ends with a pipe, that Mutt will run that shell command for each
> message and use the output as the actual index_format.  If you pass
> index_format expandos as arguments, Mutt will pass the expanded
> string.  The shell command could then use that to emit different
> formats for different messages.
> 
> For example, I have a script called format_date, and have this in
> .muttrc:
>   set index_format="/path/to/format_date '%[%s]' '%<%s>' |"
This really is a good idea.
I want to set index_format for different type mails like: 
new, deleted, replied, signed, encrypted ...
But I do not know how to use those value like ~N ~R ~D ~g ~G etc.
Do you know how to pass them to script ?
> 
> The script emits a different date format for each message in the
> index depending on how old it is: '  6:41pm' if less than a day, '
> Thu 6pm' if more than a day but less than a week, '  Jan 20' if more
> than a week but less than 30 days, and '01/20/11' if more than 30
> days.  See http://marc.info/?l=mutt-users&m=129556814118983 and the
> thread that leads up to it.
> 
> A different program could be written to examine the message flags in
> '%Z' instead of the time, and output different formats depending on
> those flags.  The script in the message linked above could serve as a
> starting point, though the middle part where it's doing the date
> calculations would need to be replaced with flag comparisons.
> 
> I don't have time to experiment with creating a full solution for the
> original poster, but hopefully this will point someone in the right
> direction.
> 
> -- 
> Ed Blackman



-- 
stardiviner GPG: 5D9F64D8 Twitter: @numbchild
http://stardiviner.dyndns-blog.com/author.html

Attachment: signature.asc
Description: Digital signature

Reply via email to