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

Re: folder-hook commands



On 2009-05-06, Alex Huth <alex.huth@xxxxxxxxxxxxx> wrote:
> * Michael Tatge schrieb:
> > * On Tue, May 05, 2009 06:09PM +0200 Alex Huth (alex.huth@xxxxxxxxxxxxx) 
> > muttered:
> > > folder-hook       . set sort = reverse-date-received
> > > folder-hook       = freebsd-current source ~/.mutt/defaults.maillist
> > 
> > better quote the argument
> > folder-hook   . 'set sort = reverse-date-received'
> > folder-hook   =freebsd-current 'source ~/.mutt/defaults.maillist'
> >                ^ also note that there's a space in your quoted version

> Have checked it now more then twice and added next row:
> 
> folder-hook . 'set sort=reverse-date-received'
> folder-hook =freebsd-current 'set sort=threads'
> folder-hook =freebsd-acpi 'source ~/.mutt/defaults.maillist'
> 
> Now i get the reverse sort as default, threads in freebsd-current and the
> error "unknown command" for freebsd-acpi. It seems that "source xxxx" is the
> problem. But if this is a unknown command in folder-hooks, how can i set
> multiple values for a folder?

The source command should work fine in a folder-hook.  I have this
in my muttrc for setting a number of default message-hooks:

    folder-hook . 'source ~/.mutt/default-message-hooks'

Perhaps the unknown command is in ~/.mutt/defaults.maillist.

(I'm glad Michael showed you the right folder-name syntax.  I don't
know what I was thinking when I put the / after the =.)

Regards,
Gary