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

Re: Sort by most recently active thread



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday, August 11 at 11:02 AM, quoth Ethan Mallove:
> My attempts at trying to incorporate this into a macro failed. 
> Neither of these do what I want :-\
>
>  macro generic ,ot "<enter-command>Ot<enter><enter-command>set 
> sort_aux=last-date-received" "Order by most recently active thread"
>  macro generic ,ot "<sort-reverse>t<enter-command>set 
> sort_aux=last-date-received" "Order by most recently active thread"

Hmmm... well, why they don't work is easy. If you want to think of it 
in terms of keybindings, "<enter-command>" is equivalent (for most 
people) to the ":" key. And if you type in :Ot, that's not going to 
get you what you want. If you got rid of the first "<enter-command>" 
and the first "<enter>", that would make the first macro start to work  
(more or less):

     macro generic ,ot "Ot<enter-command>set \
     sort_aux=last-date-received" \
     "Order by most recently active thread"

But you DO NOT want to use that binding in the *generic* sense; those 
keys ("O", for example) only have the meaning you want when in *index* 
mode, so let's change to that:

     macro index ,ot "Ot<enter-command>set \
     sort_aux=last-date-received" \
     "Order by most recently active thread"

Let's also stop using keybindings, and use function-calls exclusively 
(because otherwise you never know when changing a keybinding might 
kill some of your macros):

     macro index ,ot "<enter-command>set \
     sort=threads<enter><enter-command>set \
     sort_aux=last-date-received<enter>" \
     "Order by most recently active thread"

That should work. Note that I changed back to using "<enter-command>". 
That's because <enter-command> is used for when you want to enter any 
kind of configuration command that looks like what you would use in 
your muttrc. So if you want to "set sort=threads", then you 
<enter-command>.

It's also worth pointing out that $sort_aux ONLY APPLIES when you're 
sorting by threads, so if you always want your threads to be sorted 
that way, you can just set $sort_aux once in your muttrc. You don't 
need a macro for that.

~Kyle
- -- 
No man goes so high as he who knows not where he is going.
                                                            -- Cromwell
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkigWCIACgkQBkIOoMqOI14I2QCgsAi7OB1nlyDR4hi/kYPRFX98
rVsAoKqTSl/hAphUQeZ2pLSuUlyF8nz0
=JTEg
-----END PGP SIGNATURE-----