On Sun, 20 Sep 2009 17:42:06 +0200, Michael Tatge wrote:

> * On Sun, Sep 20, 2009 01:39PM +0000 Tamas K Papp (tkp...@gmail.com)
> muttered:
>> I find that I am doing some repetitive stuff in my .muttrc that occurs
>> in multiple places (eg called by a folder hook, and also when mutt
>> starts up).  I wonder if it would be possible to do something like
>> 
>> ## pseudocode
>> procedure gmail-folders {
>>   set from="tkp...@gmail.com"
>>   set record="+GMAIL/[Gmail].Sent Mail" set
>>   postponed="+GMAIL/[Gmail].Drafts"
>> }
>> 
>> folder-hook +GMAIL.* 'exec gmail-folders'
>> 
>> in place of
>> 
>> folder-hook +GMAIL.* 'set from="tkp...@gmail.com"' folder-hook +GMAIL.*
>> 'set record="+GMAIL/[Gmail].Sent Mail"' folder-hook +GMAIL.* 'set
>> postponed="+GMAIL/[Gmail].Drafts"'
> 
> I don't see how that's different to
> 
> folder-hook +GMAIL.* 'set from=...;\
>    set record=...;\
>    set postponed=...'

Sorry, maybe I was not clear in formulating the question.  Suppose
that I need to do the same set from=...;\ etc multiple times (eg once
at the beginning of my mutt file, so it is set correctly even before
any folder hooks are invoked; then in a folder-hook, etc).  Of course
I can just simply repeat stuff using copy-paste, but having it in one
place is nicer and easier to maintain.

Thanks,

Tamas

Reply via email to