--> David Woodfall <d...@dawoodfall.net> [2013-02-07 08:44:34 +0000]:

> On Thu, Feb 07, 2013 at 08:01:21AM +0000, James Griffin 
> <jmz.grif...@kode5.net> put forth the proposition:
> >--> David Woodfall <d...@dawoodfall.net> [2013-02-06 21:59:48 +0000]:
> >
> >>Is there a way of 1) Doing a 'limit' in the index, which shows only
> >>folders with new mail, or 2) A file-mask that I can use to do the
> >>same?
> >>
> >>Man page and google didn't find anything, and I tried making a macro
> >>for limit for the index but it didn't work.
> >>
> >>Thanks
> >
> >I see Andre has provided some of his own scripts and, they do look
> >interesting; I'll take a look too if that's ok.
> >
> >But the index view is just that. It displays messages and info about
> >them for that mailbox; so no, you couldn't use the limit function for
> >showing mailboxes with new mail other than the buffy-list function.
> >
> >In my default folder-hook I have this (borrowed from Rado's config which
> >is listed on the wiki under config tricks):
> >
> >     folder-hook . \
> >     ... ;\
> >     macro index <tab> <buffy-list> ;\
> >     ... ;\
> >     '
> >
> >     [then I list my other folder-hooks underneath]
> >
> >and at the bottom of the file
> >
> >     folder-hook . 'push <tab>'
> >
> >What that does is to list all the folders at the bottom of the index
> >view with new mail in the buffy-list each time I change to a new folder.
> >I also have buffy-list bound to <tab> as well so if I want to check the
> >buffy-list again when in the index view I just press <tab>.
> >
> >Are you still having problems getting mutt to tell you what mailboxes
> >have new mail in them?
> 
> No it works fine now. Just trying out a couple of shell scripts
> similar to Andre's, but much simpler:
> 
> mailboxes.sh:
> ##########################
> #!/bin/sh
> 
> set -e
> MAILDIR="/home/david/mail"
> HOSTNAME="blackswan"
> 
> for f in $(find $MAILDIR -name "*," -o -name "*$HOSTNAME" | cut -d'/' -f5 | \
>    sort -u | sed 's/^\.//')
> do
>    if [ "$f" == "new" ] || [ "$f" == "cur" ]; then
>        f="INBOX"
>    fi
>    echo -n " +"$f
> done
> 
> echo ########################
> 
> It seems to be working fine but for some reason I'm unable to bind it to a 
> macro in browser:
> 
> macro browser z "|~/.mutt/mailboxes.sh\n"
> 
> This just tells me that key is unbound, and I've tried it elsewhere like 
> index, which works, but I'd rather have it in browser where I'm actually 
> looking at the mailboxes.

What do you mean by "in a browser" ? Do you you mean the folder view?

-- 
Primary Key: 4096R/1D31DC38 2011-12-03
Key Fingerprint: A4B9 E875 A18C 6E11 F46D  B788 BEE6 1251 1D31 DC38

Reply via email to