Michael,

Thanks a lot for your reply.  Yes, I am using exactly the same regexp for
the account-hook's, and they are working correctly (because I'm able to get
into the INBOX's of those accounts!).

Here, in more detail, is my experimental .muttrc file:


  set mark_old=no

  folder-hook . "set folder=~/mail"

  account-hook imap://aaa.bbb.ccc.ddd set imap_user=myusername
  account-hook imap://aaa.bbb.ccc.ddd set imap_pass=mypassword
  folder-hook  imap://aaa.bbb.ccc.ddd set folder=imap://aaa.bbb.ccc.ddd
  mailboxes    imap://aaa.bbb.ccc.ddd:143/INBOX

  (and a similar 4-line code block for the other IMAP account)

  set sort_browser=unsorted


(Except for the dummy strings "aaa", "bbb", "ccc", "ddd", "myusername", and
"mypassword", this is the exact .muttrc file.)

You can see that I'm using the same regexp for the IMAP account in both the
account-hook, and the folder-hook commands.  Of course, technically, the "."
character would, I imagine, be interpreted as a special character which
stands for _any_ character, so I suppose I should be single-quoting these
regexp's, but there's really no other character (than an actual ".") that
would ever be in those positions.

Just to repeat details from my previous msgs--what happens is this.  I start
mutt, and bring up the mailboxes list (by running "y").  Then I enter either
of the two IMAP mailboxes in the list (by hitting "enter" on that line),
which gets me into that mailbox.  I then immediately run ":set ?folder",
and the following is displayed in the command-line area:

  folder="~/mail"

which obviously isn't what I was hoping to see!

And it's hard for me to imagine that there's anything amiss in my setup.
I'm just running stock mutt 1.5.20 on stock Fedora 13, right out of the box.
I haven't changed a thing.

I'll keep racking my brains (and the various mutt docs) on this one, you may
be sure, but if you (or anyone else listening in) has any insight to pass
along, I'll be most grateful.

Thanks so much for your time and expertise.

-- 
Todd Hesla



On Mon, Oct 11, 2010 at 09:01:47PM -0700, Michael Elkins wrote:

> Date: Mon, 11 Oct 2010 21:01:47 -0700
> To: Todd Hesla <[email protected]>
> From: Michael Elkins <[email protected]>
> Subject: Re: Setting folder in folder-hook
> 
> On Fri, Oct 08, 2010 at 08:49:54PM -0500, Todd Hesla wrote:
> >Am I misunderstanding what the mutt manual (manual.txt, Chapter 6, Section
> >6) is saying?  It seems to imply that, with the simple .muttrc file I showed
> >in my previous message, that the "folder" variable will be set to the
> >specified value when I enter the INBOX of one of the IMAP accounts.  (And
> >this is certainly not occurring.)  But maybe that's not what it means?
> 
> The example you posted should work correctly.  I'm guessing that the
> regexp for the imap accounts is not matching what you have intended.
> It appears that you are also using the same regexp for the
> account-hook's to set the username; does that appear to be working?

Reply via email to