mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add new browse-mailboxes function in index and pager.

This allows direct access to the mailboxes list in the folder menu.
This is useful, for instance, if $browser_sticky_cursor is set and the
current directory does not contain the open mailbox. The macro
version will lose the current mailbox while toggling to the mailboxes
list.

+28 -14
+2
OPS
··· 109 109 OP_MACRO "execute a macro" 110 110 OP_MAIL "compose a new mail message" 111 111 OP_MAIN_BREAK_THREAD "break the thread in two" 112 + OP_MAIN_BROWSE_MAILBOXES "select a new mailbox from the browser" 113 + OP_MAIN_BROWSE_MAILBOXES_READONLY "select a new mailbox from the browser in read only mode" 112 114 OP_MAIN_CHANGE_FOLDER "open a different folder" 113 115 OP_MAIN_CHANGE_FOLDER_READONLY "open a different folder in read only mode" 114 116 OP_MAIN_CLEAR_FLAG "clear a status flag from a message"
+19 -12
curs_main.c
··· 1266 1266 if (attach_msg) 1267 1267 op = OP_MAIN_CHANGE_FOLDER_READONLY; 1268 1268 1269 + case OP_MAIN_BROWSE_MAILBOXES: 1270 + if (attach_msg && (op != OP_MAIN_CHANGE_FOLDER_READONLY)) 1271 + op = OP_MAIN_BROWSE_MAILBOXES_READONLY; 1272 + 1269 1273 /* fallback to the readonly case */ 1270 1274 1275 + case OP_MAIN_BROWSE_MAILBOXES_READONLY: 1271 1276 case OP_MAIN_CHANGE_FOLDER_READONLY: 1272 1277 { 1273 1278 BUFFER *folderbuf; ··· 1293 1298 } 1294 1299 #ifdef USE_SIDEBAR 1295 1300 else if (op == OP_SIDEBAR_OPEN) 1296 - { 1297 - const char *path = mutt_sb_get_highlight(); 1298 - if (!path || !*path) 1299 - goto changefoldercleanup; 1300 - mutt_buffer_strcpy (folderbuf, path); 1301 - } 1301 + mutt_buffer_strcpy (folderbuf, NONULL (mutt_sb_get_highlight())); 1302 1302 #endif 1303 + 1304 + else if ((op == OP_MAIN_BROWSE_MAILBOXES) || 1305 + (op == OP_MAIN_BROWSE_MAILBOXES_READONLY)) 1306 + mutt_buffer_select_file (folderbuf, MUTT_SEL_FOLDER | MUTT_SEL_BUFFY); 1307 + 1303 1308 else 1304 1309 { 1305 1310 if (option (OPTCHANGEFOLDERNEXT) && Context && Context->path) ··· 1318 1323 } 1319 1324 goto changefoldercleanup; 1320 1325 } 1321 - if (!mutt_buffer_len (folderbuf)) 1322 - { 1323 - mutt_window_clearline (MuttMessageWindow, 0); 1324 - goto changefoldercleanup; 1325 - } 1326 1326 } 1327 1327 1328 + if (!mutt_buffer_len (folderbuf)) 1329 + { 1330 + mutt_window_clearline (MuttMessageWindow, 0); 1331 + goto changefoldercleanup; 1332 + } 1328 1333 mutt_buffer_expand_path (folderbuf); 1329 1334 if (mx_get_magic (mutt_b2s (folderbuf)) <= 0) 1330 1335 { ··· 1386 1391 mutt_folder_hook (mutt_b2s (folderbuf)); 1387 1392 1388 1393 if ((Context = mx_open_mailbox (mutt_b2s (folderbuf), 1389 - (option (OPTREADONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? 1394 + (option (OPTREADONLY) || 1395 + op == OP_MAIN_CHANGE_FOLDER_READONLY || 1396 + op == OP_MAIN_BROWSE_MAILBOXES_READONLY) ? 1390 1397 MUTT_READONLY : 0, NULL)) != NULL) 1391 1398 { 1392 1399 menu->current = ci_first_message ();
+3 -2
doc/Muttrc.head
··· 26 26 macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation" 27 27 28 28 # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y" 29 - macro index y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list" 30 - macro pager y "<exit><change-folder>?<toggle-mailboxes>" "show incoming mailboxes list" 29 + # note: these macros have been subsumed by the <browse-mailboxes> function. 30 + # macro index y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list" 31 + # macro pager y "<exit><change-folder>?<toggle-mailboxes>" "show incoming mailboxes list" 31 32 bind browser y exit 32 33 33 34 # Handler for gzip compressed mailboxes
+4
functions.h
··· 91 91 #endif 92 92 { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, 93 93 { "break-thread", OP_MAIN_BREAK_THREAD, "#" }, 94 + { "browse-mailboxes", OP_MAIN_BROWSE_MAILBOXES, "y" }, 95 + { "browse-mailboxes-readonly", OP_MAIN_BROWSE_MAILBOXES_READONLY, NULL }, 94 96 { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" }, 95 97 { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, 96 98 { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX, NULL }, ··· 195 197 196 198 const struct binding_t OpPager[] = { /* map: pager */ 197 199 { "break-thread", OP_MAIN_BREAK_THREAD, "#" }, 200 + { "browse-mailboxes", OP_MAIN_BROWSE_MAILBOXES, "y" }, 201 + { "browse-mailboxes-readonly", OP_MAIN_BROWSE_MAILBOXES_READONLY, NULL }, 198 202 { "create-alias", OP_CREATE_ALIAS, "a" }, 199 203 { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, 200 204 { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },