Another Useful Keybinding

Another Useful Keybinding

I just found out that the mutt mailreader accepts ~Lexpr in searches. This matches messages where expr appears either as a sender or as a recipient.

Every so often, I need to look for a mail exchange I’ve had with a particular person, or where two people have corresponded and Cc-ed me. So I’d limit to

~farensb ~C(pat|chris) || ~f(pat|chris) ~Carensb

(messages (from arensb and (to or cc-ed) to (pat or chris)) or from (pat or chris) and (to or cc-ed) to arensb, for those who don’t speak mutt-regex).

Now that I know about ~L, the above can be simplified down to

~Larensb ~L(pat|chris)

(messages (from or to or cc-ed to) arensb and (from or to or cc-ed to) (pat or chris)).

My tunnelled carpals thank you, Mutt developers!