On Thu 12.Jan.12 20:51, Tim Gray wrote:
On Jan 12, 2012 at 02:02 PM -0800, Tracy Reed wrote:
I've been a mutt user for well over 10 years but more and more I am running
into limitations which I am having trouble solving.

I don't have exactly the same setup, but I do select a 'profile' depending on what folder I'm in. I set up each profile in it's own file, like so:
   set realname="Tim Gray"
   set from="tg...@address.com"
   set use_from=yes
   set signature=~/.mutt/signatures/signature1
   set use_envelope_from=yes
   color status         black           magenta

The other profiles look similar, just with different signature files or froms. Then, set a hook like so (doesn't have to be a folder-hook, it could be a reply or send hook):

   folder-hook work "source ~/.mutt/profiles/work_profile"

The key for me was to have this at the *top* of the other hooks:

   folder-hook .* "source ~/.mutt/profiles/default_profile"

Basically, for *every* folder you enter, a profile needs to be sourced, otherwise you'll be stuck with the leftovers of some previous profile. The above hook sources the default profile for every folder that doesn't have a hook defined.

I tried this since I too have been looking for a solution to this kind
of problem. However, I am getting only partial success. I can tell it's
sourcing the profiles as I move between folders because the color of the
status bar changes, but it's not setting the From: or the signatures
that I have specified.

--
Dan

Reply via email to