changeset: 7181:8a41d1c2f267 user: Kevin McCarthy <ke...@8t8.us> date: Sat Nov 11 15:49:15 2017 -0800 link: http://dev.mutt.org/hg/mutt/rev/8a41d1c2f267
Add $change_folder_next option to control mailbox suggestion order. This patch is out of the Gentoo package maintained by Fabian Groffen. >From the link below, it appears the original author was Simon Burge. I made some minor changes to get it to apply correctly, and cleaned up the documentation a bit. Original patch description: This patch brings back the original behaviour of change-folder, which some people find more useful. It suggests the next folder in your mailboxes list that has new mail measured from the current folder, instead of the first folder from your mailboxes list in any case. This prevents starvation of folders defined at the back of your list ;) See discussion: http://thread.gmane.org/gmane.mail.mutt.devel/12457 diffs (43 lines): diff -r c12f357c909d -r 8a41d1c2f267 curs_main.c --- a/curs_main.c Sat Nov 11 19:13:40 2017 +0100 +++ b/curs_main.c Sat Nov 11 15:49:15 2017 -0800 @@ -1213,6 +1213,11 @@ #endif else { + if (option (OPTCHANGEFOLDERNEXT) && Context && Context->path) + { + strfcpy (buf, Context->path, sizeof (buf)); + mutt_pretty_mailbox (buf, sizeof (buf)); + } mutt_buffy (buf, sizeof (buf)); if (mutt_enter_fname (cp, buf, sizeof (buf), 1) == -1) diff -r c12f357c909d -r 8a41d1c2f267 init.h --- a/init.h Sat Nov 11 19:13:40 2017 +0100 +++ b/init.h Sat Nov 11 15:49:15 2017 -0800 @@ -361,6 +361,13 @@ ** */ #endif + { "change_folder_next", DT_BOOL, R_NONE, OPTCHANGEFOLDERNEXT, 0 }, + /* + ** .pp + ** When this variable is \fIset\fP, the \fC<change-folder>\fP function + ** mailbox suggestion will start at the next folder in your ``$mailboxes'' + ** list, instead of starting at the first folder in the list. + */ { "charset", DT_STR, R_NONE, UL &Charset, UL 0 }, /* ** .pp diff -r c12f357c909d -r 8a41d1c2f267 mutt.h --- a/mutt.h Sat Nov 11 19:13:40 2017 +0100 +++ b/mutt.h Sat Nov 11 15:49:15 2017 -0800 @@ -355,6 +355,7 @@ OPTBEEP, OPTBEEPNEW, OPTBOUNCEDELIVERED, + OPTCHANGEFOLDERNEXT, OPTBRAILLEFRIENDLY, OPTCHECKMBOXSIZE, OPTCHECKNEW,