aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mutt/muttrc14
1 files changed, 11 insertions, 3 deletions
diff --git a/mutt/muttrc b/mutt/muttrc
index ccd88412..e71d676c 100644
--- a/mutt/muttrc
+++ b/mutt/muttrc
@@ -268,12 +268,20 @@ macro generic,index,browser,pager \\R '\
<enter-command>echo "Reloaded $my_muttrc"<enter>' \
"Clear hooks and reload"
-# Shortcut to toggle thread display
+# I often want thread display when having to keep track of multiple
+# conversations at once with multiple people replying to one another, as is
+# regularly the case when reading mailing lists, but for my personal mail it's
+# generally nicer to sort the messages simply by date. This macro uses
+# user-defined variables to toggle $sort between "date" and "threads".
+#
+set sort = date
set my_sort_alt = threads
macro index \\t '\
-<enter-command>set my_sort_cur = $sort<enter>\
+<enter-command>set my_sort_tmp = $sort<enter>\
<enter-command>set sort = $my_sort_alt<enter>\
-<enter-command>set my_sort_alt = $my_sort_cur<enter>' \
+<enter-command>set my_sort_alt = $my_sort_tmp<enter>\
+<enter-command>unset my_sort_tmp<enter>\
+<enter-command>set ?sort<enter>' \
"Toggle thread display"
# Set a few simple colors just for a quick visual cue of which tool I'm looking