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

Re: How to limit displayed messages via folder-hooks



On 2007-10-06, Patrick Schoenfeld <schoenfeld@xxxxxxxxxxxxxxxxx> wrote:
> Hi,
> 
> i am reading several mailing lists (including mutt-users) and prefer to view
> those folders with 'limit ~N'. But it seems not to be possible to enable this
> limit for folders by default, by using folder-hooks.
> 
> Example:
> folder-hook . 'limit all'
> folder-hook =Mailinglisten.mutt-users 'limit ~N'
> 
> It says that limit is an unknown command. But why? According to the help texts
> with '?' this is exactly the command hiding behind the keybinding 'l'. What
> would I need to do in order to achieve what I want?

'limit' is a function, not a command.  folder-hooks execute commands 
not functions.  However, the 'push' and 'exec' commands will execute 
functions.  So one solution would be this:

   folder-hook =Mailinglisten.mutt-users 'push <limit>~N<Return>'

You don't need a default hook to "limit all" because the limit list 
is cleared when you change folders.

Regards,
Gary