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

Re: Deleting old messages



On Tue, Dec 09, 2003 at 11:14:27PM +0100, Nicolas Rachinsky wrote:
> > > * Ian Partridge <ian@xxxxxxxxxxxxx> [2003-12-05 13:00 +0000]:
> > > > How can I write a hook such that when a mailbox is
> > > > opened, only the 30 highest-numbered messages are retained and
> > > > the rest are purged (not just marked for deletion)?
> > > 
> > > The following should work (untested, with default key bindings).
> > > folder-hook something ':set sort=reverse-threads\nD~m>30\n$:set 
> > > sort=threads\n'
> 
> > Thanks for that advice. Unfortunately when I open the folder
> > using that hook the error message 
> > 
> > :set: unknown command
> > 
> > appears.
> > 
> > I have entered the hook exactly as you described.
> 
> Hmm, it seems there is a push missing, but I'm not totally sure about
> the correct quoting (too tired to think hard or try it). But something
> similar to one of the following should work:
> folder-hook something push ':set sort=reverse-threads\nD~m>30\n$:set 
> sort=threads\n'
> folder-hook something 'push :set sort=reverse-threads\nD~m>30\n$:set 
> sort=threads\n'
> folder-hook something "push ':set sort=reverse-threads\nD~m>30\n$:set 
> sort=threads\n'"

Thanks Nicholas - the last of these suggestions worked successfully
for me.

-- 
Ian Partridge <ian@xxxxxxxxxxxxx>