<<< Date Index >>>     <<< Thread Index >>>

Re: Meta-Macro's and General Folder-Hook Question



* Stef <stef@xxxxxxxxx> [2004-06-07 19:40 -0400]:
> 
> Hello everyone,

G'day,

>       Firstly, let me thank all and sundry for
> all the patches and time/sweat/tears that has gone
> into mutt. I have used it for a few years, but since
> this is my first 'official' mutt-users mail, i may
> as well say 'kudos' to all.
> 
>       My problem comes with the problem of having
> macro's calling macro's (i call these meta-macros,
> rightly or wrongly, so apologies if my terminology
> gets confusing). I have two macro's like this:
> 
>       macro index ,m <tag-pattern>'~s 
> "Undeliverable.Mail"\|"[Oo]ut.[Oo]f.*[Oo]ffice"\|"[Oon 
> ]*[Vv]acation\|[Hh]oliday"\|"Returned.mail"'<enter><tag-prefix-cond><save-message><enter><enter><sync-mailbox>
>  'Spam Filter'
> 
>       # This is the archive macro for the main 'INBOX'
> macro index .a 
> <change-folder>'!'<enter><tag-pattern>~m>100<enter><tag-prefix-cond><save-message>Mail/inbox-arc<enter><sync-mailbox>
>  'INBOX Archive Filter'
> 
> 
>       Now, both of these work as i want, however,
> i keep finding myself doing the four keypresses and
> thought, 'hey, why not jst cut this down to two ?'
> (or one later such as ctrl-y or such). So, i (perhaps
> naively) tried this:
> 
>       macro index ,z ',q<enter>,w<enter>" 'My Meta-Macro'
> 
>       However, that stops if the first macro doesnt
> match anything with a 'Nothing to do' error message,
> so, is there anyway to tell it to proceed onto the
> next 'macro' regardless of the previous exit state ?

Your macros are missing <end-cond>'s. So when you put them together, the
second macro is conditional on the first one's tag-pattern. Put in the
<end-cond>'s and all will be well.

>       My other small question is even simplier, but
> something that I cant seem to find. Do folder-hooks (on
> ! obviously) work as and when 'new mail' comes into the
> spoolfile ? If not, is there anyway to set this up ?

Folder-hooks are applied when you enter the folder, not when mail enters it.

>       Many thanks to all

No trouble.
-- 
Joshua 'bruce' Crawford ... http://www.geocities.com/mortarn

Abstinence makes the heart grow fonder.

Attachment: pgpINZCMdpKzp.pgp
Description: PGP signature