Hello! Your words sound reasonable, and it seems like macro would be
enough, and folder hooks are not needed. 
However, I am not sure, if I understand for all of this works, so it
would be great to hear, what do those familiar with mutt say.

On Thu, Sep 10, 2015 at 08:53:14AM -0400, Matthew Phillips wrote:
> On Thu, Sep 10, 2015 at 07:22:25AM +0300, Jayson Willson wrote:
> > Hi, Am!
> > It seems like I have managed to get it working:
> > I got rid of account-hooks, defined username and password in per-account
> > configs and added following to muttrc:
> > folder-hook userna...@gmail.com 'source ~/.mutt/username1'
> > folder-hook userna...@gmail.com 'source ~/.mutt/username2'
> > It appeared to be easier, than I thought :)
> > 
> > 
> > On Wed, Sep 09, 2015 at 08:41:34PM +0000, Am Jam wrote:
> > > On Tue, Sep 08, 2015 at 08:22:17PM +0300, Jayson Willson wrote:
> > > > Hello!
> > > > I have the following configuration (two IMAP and SMTP accounts):
> > > >  > cat .mutt/muttrc
> > > > pastebin.com/NN7EJF8E
> > > >  > cat .mutt/user1
> > > > http://pastebin.com/w19fSTqh
> > > > And user2 is configured in the same way.
> > > > With such configuration, when I launch mutt, I get to user1 mailbox and 
> > > > everything is fine. If I press F3, I get to user2 mailbox and 
> > > > everything 
> > > > is fine again, but if I press F2, I do not get to user1 mailbox, but 
> > > > instead stay in user2 and there is not way to get to user 1.
> > > > Could you please help me to organize multiple accounts with mutt? Thank 
> > > > you very much.
> > > > -- 
> > > > Yours sincerely, Jayson Willson
> > > 
> > > Hi Jayson,
> > > 
> > > Your .muttrc looks very similar to mine. The only visible differences I
> > > can see is that I do not have those folder-hooks in mine. Additionally,
> > > I do not have the account-hooks in each of my user profiles:
> > > 
> > > account-hook $folder "set imap_user=$my_user imap_pass=$my_pass"
> > > 
> > > Perhaps remove each of these lines in the user profile files and try
> > > switching again?
> > > 
> > > 
> > > -- 
> > > Am Jam
> > 
> > -- 
> > Yours sincerely, Jayson Willson
> 
> Can anyone explain why it is needed to use the source command twice?
> Once when defining the folder-hooks and once in the macro. I would think
> the macro would just execute a command that executes the correct folder
> hook.

-- 
Yours sincerely, Jayson Willson

Reply via email to