On 2011-11-09, stardiviner wrote: > => On [2011-11-08 09:13:27 -0800]: > Gary Johnson Said:
> > You can also use conditional elements in index_format that will > > print different pieces of information depending on the values of > > other pieces of information. This is explained in the mutt manual > > in the "Conditionals" section. > > > > As an example, I have this string as part of my index_format. > > > > %?X?*& ? > I have already tested, this %?n?new? only work in status_format, can not work > on index_format correctly. > here is my result: > I set them like this: > folder-hook =INBOX set index_format = '" %?n?new? %?o?old? %?d?del? %2C|%N > [%4Z] | %-10L %?H?[spam]? %10s %> %4c %[%I:%M %P %b/%d]"' # for macro "gi" > > new old del 9|0 [ O +] | VeryCD » subject: ....... > new old del 9|0 [ O +] | VeryCD » subject: ....... > new old del 9|0 [ O +] | VeryCD » subject: ....... > new old del 9|0 [ O +] | VeryCD » subject: ....... > new old del 9|0 [ O +] | VeryCD » subject: ....... There is a problem with your folder-hook. The command argument must be a single string, like this. folder-hook =INBOX 'set index_format=" %?n?new? %?o?old? %?d?del? %2C|%N [%4Z] | %-10L %?H?[spam]? %10s %> %4c %[%I:%M %P %b/%d]"' # for macro "gi" Note that I moved the opening single quote to the beginning of the command so that "set index_format=" is included in the command. I also removed the spaces on both sides of the equal sign. I did not test the resulting hook, however. Regards, Gary