** Cameron Simpson <[email protected]> [2015-09-25 09:22]:
> On 24Sep2015 12:22, Paul Tansom <[email protected]> wrote:
> >Is there a way to change the status_format when you change folders / 
> >accounts?
> >
> >I currently have lines similar to:
> >
> >set status_format = "-%r-Mutt: aptanet.com %f [Msgs:%?M?%M/?%m%?n? 
> >New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? 
> >Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
> >
> >in my main muttrc, and then my folder-hook and/or account-hook sections, but 
> >it
> >never changes on the display. All the other changes I've got in there seem to
> >work fine.
> 
> Can you show us the account-hook lines, perhaps with private information
> obscured?
> 
> It looks like account-hook should do the trick for you but I don't have an
> myself at present. There are examples here just in case you haven't looked
> at them:
> 
>  http://www.mutt.org/doc/devel/manual.html#account-hook
** end quote [Cameron Simpson]

In my main muttrc file I have:


account-hook imaps://[email protected]@imap.localdomain.com 'set imap_user = 
[email protected]'
source ~/.mutt/muttrc.domain1.com
account-hook imaps://[email protected]@imap.localdomain.com 'set imap_user = 
[email protected]'
source ~/.mutt/muttrc.domain2.com
account-hook imaps://[email protected]@imap.localdomain.com 'set imap_user = 
[email protected]'
source ~/.mutt/muttrc.domain3.com
account-hook imaps://[email protected]@imap.localdomain.com 'set imap_user = 
[email protected]'
source ~/.mutt/muttrc.domain0.com


The last one seems to end up as the default one you log into and then it cycles
through from the top. Not quite sure why. Then the additional muttrc.domanX.com
files are something like:


folder-hook imaps://[email protected]@imap.localdomain.com \
'set realname = "Paul Tansom"
 set hostname = domain1.com
 set status_format = "-%r-Mutt: domain1.com %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? 
Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? 
%l?]---(%s/%S)-%>-(%P)---"
 my_hdr From: Paul Tansom <[email protected]>
 my_hdr Sender: Paul Tansom <[email protected]>
 my_hdr Envelope_from: Paul Tansom <[email protected]>
 set folder = imaps://[email protected]@imap.localdomain.com/
 set spoolfile = imaps://[email protected]@imap.localdomain.com/
 set record = imaps://[email protected]@imap.localdomain.com/Sent
 set postponed = imaps://[email protected]@imap.localdomain.com/Drafts
 set signature = ~/.mutt/sig.domain1'

mailboxes = imaps://[email protected]@imap.localdomain.com/
mailboxes = imaps://[email protected]@imap.localdomain.com/news
mailboxes = imaps://[email protected]@imap.localdomain.com/jobs
mailboxes = imaps://[email protected]@imap.localdomain.com/cron
mailboxes = imaps://[email protected]@imap.localdomain.com/rkhunter


All was working fine until I added the set status_format line. To be fair it
still is, it just hasn't changed anything (except for the new set status_format
line in the main muttrc which always gets used).

-- 
 Paul Tansom  |  Aptanet Ltd.  |  https://www.aptanet.com/  |  023 9238 0001
 Vice Chair, FSB Portsmouth & SE Hampshire Branch  |  http://www.fsb.org.uk/
=============================================================================
Registered in England | Company No: 4905028 | Registered Office: Ralls House,
Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP

Reply via email to