About Archive Tags RSS Feed

 

That's really one of the saddest things I've ever heard.

8 June 2009 21:50

Today I updated the package of mutt which is stored upon my apt-get repository - the Lenny repository now contains an updated copy of mutt & mutt-ng.

This package is synced from sid and contains the addition of a small patch to update the sidebar handling so that it is possible to show only folders with new mail (Before/After)

I've talked about this patch before, and the mutt sidebar generally, so I'll not repeat myself.

Instead I will share this simple mutt tip:

#
#  Specify which mails to show when changing folder:
#
folder-hook . push '<limit>((~N|~O)!~D)|(~d<1d!~Q)<enter>'

What does this do? When changing folder it limits the display of messages to those which match either pattern:

PatternMeaning
(~N|~O)!~D)

That is "New" or "Old" messages which haven't been deleted.

(~d<1d!~Q)

Messages received in the past day which haven't been replied to.

(The first pattern could be simplified but I like to be explicit and match "N"ew and "O"ld messages directly.)

I also have the following macros setup so I can type ".a" to view all messages in the current folder, ".t" to view only messages received today, ".n" to view only new messages, and ".y" to view all messages received yesterday:

macro index .n "l~N\n"
macro index .a "l~A\n"
macro index .t "l~d<1d\n"
macro index .y "l~d<2d ~d>1d\n"

ObFilm: Dead Like Me

| 4 comments

 

Comments on this entry

icon cedric at 08:22 on 9 June 2009
Interesting. But doesn't your hook lack the limit command and carriage return though? And I'd expand it to show flagged messages as well: folder-hook . push 'l((~N|~O|~F)!~D)|(~d<1d!~Q)\n'
icon Steve Kemp at 08:55 on 9 June 2009

Yes, you're correct. My initial posting missed the <limit> and <return> - annoying HTML markup error at my side.

Adding flagged messages would be a nice touch, but to be honest I don't use flags. I leave messages as "new" if they're to be flagged for repeat-viewing.

icon tony at 12:11 on 9 June 2009
I've been wondering how to decipher the side bar. means it has an attachment, right? I suppose I'll go aptitude update/safe-upgrade and get the shiny, new mutt...
thanks tony
icon Steve Kemp at 13:04 on 9 June 2009

Tony the sidebar is just a list of mailboxes - it shows mailboxes which have new messages in them but has nothing to do with attachments.

For details do see this introduction to mutt-ng - the sidebar is one of the things moved into the newer mutt packages.