Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Always display flagged messages in mutt

Tags:

mutt

In mutt, I'd like to keep track of important messages which I need to answer, pretty much like I did in GMail before. The problem is that I tend to forget that I have such important messages, and so, never run the macro which makes flagged messages appear (in case they are too old to appear in the index). So, I'd like that the flagged messages always appear in the main index, no matter how old they are. This setting, along with the fact that the flagged messages appear in a different color (they already do), should be enough to prevent me to forgetting answering old - but important - messages. Is that possible ?

Thanks in advance!

like image 706
user1536048 Avatar asked Mar 23 '23 08:03

user1536048


1 Answers

The ordering of messages cannot be changed arbitrarily outside the scope of sort and sort_aux. However, you can limit the messages in your index to specific kinds of mail and bind everything neatly to macros, like so:

macro index .i  "<limit>(~N|~F)<Enter>"  "view new/flag"
macro index .a  "<limit>~A<Enter>"       "view all"

The first macro .i will limit messages in the index to only flagged (starred) and new ones, whereas the latter .a will remove any limit and show all messages, again.

You can automatically apply one of these views when entering a mail folder by utilizing a folder-hook.

folder-hook */INBOX push .i

Just alter the regular expression following the hook to whatever folder(s) you want to apply the macro to. Simply press .a at any point in the index to show all messages, again.

For further details consult the manpage, as it is fairly comprehensive.

like image 185
cfricke Avatar answered Mar 25 '23 22:03

cfricke