On Fri, Dec 18, 2009 at 07:10:35PM +0000, chombee wrote:
> That means that for every variable I set in a muttrc.accountX file
> (and I have several of these files) I have to include a default case
> in the master muttrc file, or I'll get unexpected behaviour. This is
> a recipe for disaster, at some point I will edit a muttrc.accountX
> file and forget to add a default case. There must be a better way?

i have three IMAP accounts and simply run three mutt instances within screen. my
~/.screenrc contains (something similar to) the following lines:

====================================================

screen -t "Local" mutt -F .muttrc-local
screen -t "Account 1" mutt -F .muttrc-1
screen -t "Account 2" mutt -F .muttrc-2
screen -t "Account 3" mutt -F .muttrc-3

select 1 

====================================================

each ~/.muttrc-* contains just the settings for the specific account and then it
sources ~/.muttrc, which contains general settings.

if i add some setting to one of the .muttrc-X files, it becomes active after a
simple restart, because in most cases, the general .muttrc doesn't change it.
(most settings are commented out and use their default value unless set in
.muttrc-X.)

i find this set up much easier to handle than a bunch of hooks to change my
account settings. (which i think is a confusing and less than ideal way of
dealing with multiple accounts...) and because the different instances of mutt
are running in a screen session, they don't feel like different instances. and
switching accounts is much faster, because mutt doesn't need to change all
settings and then log on to another server. i just type C-a [0-3].


-- 
Joost Kremers
Life has its moments

Reply via email to