Xu Wang wrote (Sat 2017-Jun-24 13:12:03 -0400):
> It almost work. But for a splitted second, the screen shows all emails
> (because it takes time to process filter request). I know this sound
> weird to all, but even in this splitted second I see all emails and I
> get nervous with everything I must accomplish, and I cannot focus.
>
> Is there a way to ask mutt to wait until filter complete before show
> the results, so mutt never shows all emails?
How about a different approach: Set all colors to "black on black"
using a config file, start Mutt the way you are already doing it,
and then apply normal color settings (e.g. by sourcing a different
config file)?
I tried the following for a quick test, but it looks as if a redraw
happens (using the default colors) before the <limit> has been fully
applied; so this won't be good enough unless someone can add a hint
on how to postpone the redrawing:
mutt -e 'color index black black .' \
-e 'push "l~f'"Jian"'\n"' \
-e 'color index default default .'
Also, setting the index colors to "black on black" via "-e" will be
applied too late, so that will have to go into a config file.
Keeping invisible all emails not from Jian might be a solution? If
you don't need a command short enough to type (but sticking it into
a shell script or similar is fine), this approach might work:
mutt -F muttrc_index-black-on-black \
-e 'color index default default "~f Jian"' \
-e 'push "l~f'"Jian"'\n"'
I did notice, however, that the indicator in the index will still
highlight (= show) a single line for a short while if there is no
match for your pattern. Not sure if this is acceptable -- if not,
initially setting the indicator's colors to "black on black" might
be required, too -- but setting them back to the default coloring
must only happen after the <limit> has been applied...
Cheers, Marcus
--
Marcus C. Gottwald · <[email protected]> · https://cheers.de