Re: Sort by most recently active thread
- To: mutt-users@xxxxxxxx
- Subject: Re: Sort by most recently active thread
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Mon, 11 Aug 2008 10:17:54 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=bI5x12zVkFrR3U3sc2HvTILX8uE=; b=TZnk BUDLYjMjINgN07l6E8ErpwnmsFwYiflBci4b1saYgfcWA4Kx01yIk6aMrC0YS0KB 2x3SNZ96LrLLGWaF0xr8Ek+qf0bSZbuXL9hUte2RZ2+mQPRm3q+caO3hSdxsqFk6 Pyc4te6Oswh7nKqtYIBL//jDWBR/TD2dcaDmcSc=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=a8j5NYwdQ++AW1tknLq7ATsZTge3NczdrLVHW18ta09KamTKFQRCuoOB41adl3c+WQLbHOUHtTbR/onePU2HJrA/yowdGUZfvBj7nidYK1sIJP6Xu5IjxtQ1XytdoOxEcKgfLSTwxztyZhIxdEdNrBhKdXuOgN2INTApbSdNg3Y=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20080811150201.GB58773@xxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20080808200700.GA58773@xxxxxxx> <20080808203718.GM81565@xxxxxxxxxxxxx> <20080811150201.GB58773@xxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-07-21)
-----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-----