Can folder-hook refer to a sub-directory mailbox?

Chris Green cl at isbd.net
Thu Jun 24 20:18:25 UTC 2021


On Thu, Jun 24, 2021 at 09:15:06PM +0100, Chris Green wrote:
> On Thu, Jun 24, 2021 at 12:30:35PM -0400, Patrick Shanahan wrote:
> > * Chris Green <cl at isbd.net> [06-24-21 12:16]:
> > > It's a bit difficult to explain this.
> > > 
> > > Is it possible for a folder-hook RE to apply to all mailboxes in a
> > > sub-directory?
> > > 
> > > E.g. can one produce an RE for all the sub-directories of ~/mail/folder?
> > > All my actual mailboxes are two levels further down:-
> > > 
> > >     ./folder/france
> > >     ./folder/france/jobs
> > >     ./folder/france/healthcare
> > >     ./folder/france/healthcare/tmp
> > >     ./folder/france/healthcare/new
> > >     ./folder/france/healthcare/cur
> > >     ./folder/france/healthcare/cur/1601033995.000001.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000004.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000002.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000007.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000003.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000005.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000000.mbox:2,
> > >     ./folder/france/healthcare/cur/1601033995.000006.mbox:2,
> > >     ./folder/france/houseSitting
> > >     ./folder/france/houseSitting/tmp
> > >     ./folder/france/houseSitting/new
> > >     ./folder/france/houseSitting/cur
> > >     ./folder/france/houseSitting/cur/1601033995.000000.mbox:2,RS
> > > 
> > > The mailboxes are jobs (though it's empty), healthcare and housesitting.
> > > Obviously I actually have lots more mailboxes in lots more
> > > sub-directories below ./folder.  Can a folder-hook RE select them all?
> > > 
> > > I.e. does 'folder/.*/.*' work?
> > 
> > 
> > did you consider seting it and then trying?
> > 
> Well I have now and it doesn't appear to work.
> 
> I have put the following in my muttrc file:-
> 
>     folder-hook . set mbox_type=maildir
>     folder-hook 'folder/.*' set mbox_type=mbox
> 
> ... and when I save mail in the folder hierarchy it's still in maildir
> format.
> 
... and I have also tried:-

    folder-hook . set mbox_type=maildir
    folder-hook '~/mail/folder/.*' set mbox_type=mbox

It still doesn't work.

-- 
Chris Green


More information about the Mutt-users mailing list