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

Re: Folder hooks not working.



* Josef Karthauser <joe@xxxxxxxxxx> [2004-01-06 21:40 +0000]:
> Playing with it now I think that I'm making a bit more sense of it.
> Part of the problem is that I'm using MailDir format folders and of
> course they sometimes have a trailing "/" character on the end,
> especially if I use tab to complete the name. 

I can confirm this behaviour. I think it's a bug, it should at least
be mentioned in the docs. I think, you should file a 'flea'.

I see three things you can do:

- leave the / always out, when changing folders
- don't end your patterns with $, this should cause no problems if
  there are no folders starting with the same prefix
- end your patterns with '/?$' instead of '$' 

> The other bit is to do
> with how the spool (inbox) folder is accessed.  I have a rule:
> 
>     set spoolfile="=INBOX"
>     macro index \cx "$y|isync INBOX\n"

That's no rule, it's just a one time assignment.

> but it doesn't get re-triggered when I access '!' or '=INBOX' after
> going to another folder.  Perhaps this needs to be replaced with a
> 
>     'folder-hook .* FOO'
> 
> directive so that it gets triggered on any folders that aren't
> explicitly matched by other hooks.  It's a bit counter intuitive though,
> I would expect that the correct behaviour "TM" should be that
> folder-hook values over ride the current defaults, which are returned
> after changing to a folder without a hook configured for it.

This is the documented behaviour, you need in fact a 'default' hook.
This one should be the first (and . instead of .* is enough and
perhaps faster).

The current way gives you more flexibility, but I don't know if anbody
uses it.

BTW: Sometime no folder-hooks are triggered (IIRC if you run 'mutt
address'), so perhaps you don't want to replace your static settings
with folder-hooks but add the hooks.

HTH,
Nicolas