Kyle Wheeler ha scritto: > On Sunday, November 16 at 08:52 PM, quoth Alberto Rizzi: >> I want to use four different "Form:" header depending on the folder >> I am in. > > That's a fairly standard request. > >> account-hook get executed only the first time I open a folder on >> that account > > It's actually more complicated than that. Account hooks are run > whenever needed, as determined by mutt. They're designed primarily for > setting connection-based things, such as $imap_pass and that sort of > thing. > >> Maybe I can use a folder-hook but how can I create the correct >> regexp? How? > > What are the folders? > > You can try something like this: > > folder-hook imap://[EMAIL PROTECTED]/ 'set [EMAIL PROTECTED]' > folder-hook imap://[EMAIL PROTECTED]/ 'set [EMAIL PROTECTED]' > folder-hook imap://[EMAIL PROTECTED]/ 'set [EMAIL PROTECTED]' > > The details, of course, depend on exactly what your accounts are. > > ~Kyle
This is a cut down version of my muttrc file. Under "poste.it" I have other folders (4 folders) that are not under INBOX like fastmail but directly under root. Now under the two uni account I don't have folders other than INBOX but I will create some folders. I don't like the multiple folder hook at the end; I'd like to use only a folder hook for the fastmail server instead of a folder hook for each folder #Account account-hook . 'unset imap_user; unset imap_pass' account-hook imaps://mail.messagingengine.com/ 'set imap_user=user imap_pass=pwd' account-hook imaps://relay.poste.it/ 'set imap_user=user imap_pass=pwd' account-hook imap://lando 'set imap_user=user imap_pass=pwd' account-hook imaps://mail.ethz.ch/ 'set imap_user=user imap_pass=pwd' account-hook imaps://iis-imap.ee.ethz.ch/ 'set imap_user=user imap_pass=pwd' set spoolfile=imaps://relay.poste.it/INBOX set folder=imaps://mail.messagingengine.com mailboxes +INBOX mailboxes +INBOX.Advocacy mailboxes +INBOX.Aiuto mailboxes +INBOX.Esperti mailboxes +INBOX.Gnome mailboxes +INBOX.Mobile mailboxes +INBOX.Mutt mailboxes +INBOX.ParmaLug mailboxes +INBOX.Questions mailboxes +INBOX.Varie set folder=imaps://relay.poste.it mailboxes +INBOX #set folder=imap://lando #mailboxes +INBOX set folder=imaps://mail.ethz.ch mailboxes +INBOX set folder=imaps://iis-imap.ee.ethz.ch mailboxes +INBOX #Ordinamento folder-hook . set sort = date folder-hook INBOX.Advocacy 'set sort = threads; exec collapse-all' folder-hook INBOX.Aiuto 'set sort = threads; exec collapse-all' folder-hook INBOX.Esperti 'set sort = threads; exec collapse-all' folder-hook INBOX.Gnome 'set sort = threads; exec collapse-all' folder-hook INBOX.Mobile 'set sort = threads; exec collapse-all' folder-hook INBOX.Mutt 'set sort = threads; exec collapse-all' folder-hook INBOX.ParmaLug 'set sort = threads; exec collapse-all' folder-hook INBOX.Questions 'set sort = threads; exec collapse-all' folder-hook INBOX.Varie 'set sort = threads; exec collapse-all' set sort_browser = alpha