From f1d624683a0bce72ec341ff16e702c7fca7476a0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 17 May 2020 21:07:42 +1200 Subject: Overhaul Mutt macros --- mutt/muttrc | 71 ++++++++++++++++++++++--------------------------------------- 1 file changed, 26 insertions(+), 45 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index b91c66cd..a16a0088 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -125,8 +125,28 @@ bind generic,index,browser,pager \Cb previous-page # Turn off annoying mailbox lock feature bind index '%' noop +# Shortcuts to jump to mailboxes; the format here is byzantine, but it copes correctly with changes to the variables +macro generic,index,browser,pager gi \ + '!' \ + 'Change to inbox' +macro generic,index,browser,pager gs \ + '<' \ + 'Change to sent' +macro generic,index,browser,pager gb \ + '-' \ + 'Change to previous' +# The format here is pretty weird, but it copes correctly with changes to the +# variable that occur *after* the macro is defined, and there isn't +# a punctuation shortcut for it like there is for the previous three. I'd love +# to know if there's a better way to do this that I've missed in the manual. +macro generic,index,browser,pager gd '\ +push "$postponed"' \ + 'Change to drafts' + # Blindly save message to whatever box is suggested -macro index,pager S 's' 'Save message blindly' +macro index,pager S \ + '' \ + 'Save message blindly' # Shortcut to add addresses to abook macro index,pager A \ @@ -134,50 +154,11 @@ macro index,pager A \ 'Add sender address to abook' # Shortcut to reload configuration -macro generic,index,browser,pager \\R \ - ':source ~/.config/mutt/muttrc:echo "Config reloaded!"' \ - 'Reload muttrc' - -# SpamAssassin spam tagging; Vim's muttrc syntax highlighting hates this, but -# it *is* valid -spam 'X-Spam-Flag: YES' 'SPAM' - -# Defaults for SpamAssassin training -set my_salearn = 'sa-learn' -set my_spam_folder = "$folder/spam" +macro generic,index,browser,pager \\R '\ +unhook *\ +source $alias_file\ +echo "Reloaded with $alias_file"' \ + "Clear hooks and reload" # Machine or account specific settings source ~/.config/mutt/muttrc.d/src| - -# These hooks and macros go *after* we're done loading user options, as they -# bake in variables like $folder. Only hooks and macros dependent on these -# paths should be set after this point. - -# Shortcuts to jump to mailboxes -macro generic,index,browser,pager gi \ - "$spoolfile" \ - "Change to inbox" -macro generic,index,browser,pager gs \ - "$record" \ - "Change to sent" -macro generic,index,browser,pager gd \ - "$postponed" \ - "Change to drafts" - -# SpamAssassin spam tagging -folder-hook . \ - 'macro index,pager \Cs \ - "$my_salearn --spam$my_spam_folder" \ - "Train as spam, move to spam"' -folder-hook . \ - 'macro index,pager \Ch \ - "$my_salearn --ham" \ - "Retrain as ham"' -folder-hook $my_spam_folder \ - 'macro index,pager \Ch \ - "$my_salearn --ham!" \ - "Train as ham, move to inbox"' -folder-hook $my_spam_folder \ - 'macro index,pager \Cs \ - "$my_salearn --spam" \ - "Retrain as spam"' -- cgit v1.2.3 From 7488e8a88e11b685411d8fb540858c0ae97a40f6 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 17 May 2020 21:50:13 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 633ddfb1..9bc6340a 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v8.40.0 -Sun, 17 May 2020 05:19:31 +0000 +tejr dotfiles v8.41.0 +Sun, 17 May 2020 09:50:13 +0000 -- cgit v1.2.3