set sort_browser=alpha
set history=1000 # Number of lines of history in memory
-set history_file==tmp/.mutt-history
+set history_file==tmp/.mutt_history
set save_history=1000 # Number of lines of history in file
set read_inc=10 # Progress indicator when reading folders.
set pager_context=1 # No. of lines of context to give when scrolling
set pager_index_lines=6 # How many index lines to show in the pager
set pager_stop # Don't move to the next message on next-page
-set postponed==tmp/.mutt-postponed
+set postponed==tmp/.mutt_postponed
set print=ask-no # Don't waste paper
set recall=no # When I say "compose", ask me whether I want to continue composing a postponed message.
set reply_regexp="^((re([\\[0-9\\]+])*|aw|на):[ \t]*)+[ \t]*" # A regular expression to detect replies
# Macros
#
-# Go to the first folder with unread messages
-macro index C <Home>c\n
-macro pager C q<Home>c\n
-
-# Move current message to inbox
-macro index,pager S s!\n
-
-macro index,pager <Esc>h ":auto_view text/html\n"
-macro index,pager <Esc>H ":unauto_view text/html\n"
-
-# Pipe spam
-#macro index,pager z |"sa-learn --no-sync --ham\n"
-#macro index,pager Z |"sa-learn --no-sync --spam\n"
-macro index,pager <Esc>s "<Enter>q"|"spamassassin -d | ~/mail/bin/spamcop.py\nj"
-macro index,pager <Esc>z "<Enter>q:set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqn"
-
-# Go to main mailbox
-macro index H <Home>c!\n
-macro pager H q<Home>c!\n
+macro index C \
+ <Home><change-folder><Enter> \
+ "Go to the first folder with unread messages"
+macro pager C \
+ <exit><Home><change-folder><Enter> \
+ "Go to the first folder with unread messages"
+
+macro index,pager S \
+ <save-message>!<Enter> \
+ "Move current message to inbox"
+
+macro index,pager <Esc>h \
+ ":auto_view text/html<Enter>" \
+ "View HTML attachments"
+macro index,pager <Esc>H \
+ ":unauto_view text/html<Enter>" \
+ "Don't show HTML attachments"
+
+macro index <Esc>s \
+ "<pipe-message>spamassassin -d | ~/mail/bin/spamcop.py<Enter><next-undeleted>" \
+ "Send spam to SpamCop"
+macro pager <Esc>s \
+ "<exit><pipe-message>spamassassin -d | ~/mail/bin/spamcop.py<Enter><next-undeleted>" \
+ "Send spam to SpamCop"
+macro index <Esc>z \
+ ":set editor='vim -s ~/mail/misc/spamcop.vim'<Enter><reply>:set editor=vim.sh<Enter><exit>n" \
+ "Process message from SpamCop"
+macro pager <Esc>z \
+ "<exit>:set editor='vim -s ~/mail/misc/spamcop.vim'<Enter><reply>:set editor=vim.sh<Enter><exit>n" \
+ "Process message from SpamCop"
+
+macro index H \
+ <Home><change-folder>!<Enter> \
+ "Go to inbox"
+macro pager H \
+ <exit><Home><change-folder>!<Enter> \
+ "Go to inbox"
+macro index M \
+ <Home><change-folder>=sent-mail<Enter> \
+ "Go to sent-mail"
+macro pager M \
+ <exit><Home><change-folder>=sent-mail<Enter> \
+ "Go to sent-mail"
# Go to python mailbox
-macro index Y <Home>c=lists/python\n
-macro pager Y q<Home>c=lists/python\n
+macro index Y \
+ <Home><change-folder>=lists/python<Enter> \
+ "Go to python"
+macro pager Y \
+ <exit><Home><change-folder>=lists/python<Enter> \
+ "Go to python"
+
+# Go to STCnet "Atlas"/STM mailboxes
+macro index A \
+ <Home><change-folder>=stcnet<Enter> \
+ "Go to stcnet inbox"
+macro pager A \
+ <exit><Home><change-folder>=stcnet<Enter> \
+ "Go to stcnet inbox"
+macro index <Esc>a \
+ <Home><change-folder>=sent-stcnet<Enter> \
+ "Go to sent-stcnet"
+macro pager <Esc>a \
+ <exit><Home><change-folder>=sent-stcnet<Enter> \
+ "Go to sent-stcnet"
# Recode base64 to 8bit, html to plain text, mustdie-1251 to koi8-r, etc.
-macro index,pager M "|mimedecode.py | less\n"
-macro index,pager E ":set editor=mimedecode.sh\ne:set editor=vim.sh\n"
-
-# Convert X-Face header to an image and display it
-macro index,pager <Esc>f |"~/mail/bin/view-x-face\n"
+macro index,pager \
+ <Esc>m "<pipe-message>mimedecode.py | less<Enter>" \
+ "View MIME-decoded message"
+macro index,pager E \
+ ":set editor=mimedecode.sh<Enter><edit>:set editor=vim.sh<Enter>" \
+ "MIME-decode and save"
+
+macro index,pager <Esc>f \
+ <pipe-message>~/mail/bin/view-x-face<Enter> \
+ "Convert X-Face header to an image and display it"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#