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

Re: Different sorting of mailboxes



Thanks Toby!

On Wed, Apr 13, 2005 at 12:48:08PM +0200, Toby wrote:
> 
> That would be because all your maildirs are inside your spool maildir,
> so when mutt is reading folder-hooks for $HOME/Maildir/example it does:
> 
> folder-hook .                   => match (this matches everything)
> folder-hook $HOME/Maildir       => match (example is inside Maildir)
> folder-hook $HOME/Maildir/.sent   => no match
> 
> The last match yields 'set sort=date-received' and mutt duly obliges.
> 
> Try one of these instead:
> 
> folder-hook !$                'set sort=date-received'
> folder-hook !/$               'set sort=date-received'
> 
> A "$" at the end of a regular expression matches the end-of-line, so
> this hook shouldn't match any subfolders.  Maybe.

Forgotten that the expression after 'folder-hook' is a regexp. You are
perfectly right here in your assumption Toby. After a slight change in
the sorting policy (date-received as default, override for .sent and all
other which starts with a '.'), it works. I did set up the following
rules:

# first the default rule
folder-hook .                   'set sort=date-received'   

# match any things that starts with a '.', *including* .sent, and set
# threads as sorting
folder-hook $HOME/Maildir/\..*  'set sort=threads'

# override the threads sorting for the .sent folder
folder-hook $HOME/Maildir/.sent 'set sort=date-sent'

Now is only one thing left, I do normally prefer reverse-threads (most
recent on top), but would like the sub-thread to be non-reverse... But
that will be saved for another day to investigate :)

-- 

Regards, Per Carlson

"... a cross-platform game engine that require Windows with DirectX 8.1 ..."