<<< Date Index >>>     <<< Thread Index >>>

mutt/2143: sort-mailbox should also work in pager



>Number:         2143
>Notify-List:    
>Category:       mutt
>Synopsis:       sort-mailbox should also work in pager
>Confidential:   no
>Severity:       minor
>Priority:       low
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 28 14:10:52 +0100 2005
>Originator:     Andreas Amann
>Release:        1.5.11
>Organization:
Research
>Environment:
Solaris 9
>Description:
I often need to change the sort order of the messages while in the pager, i.e. 
I want to put the following into muttrc:
bind pager o sort-mailbox
bind pager O sort-reverse

The following patch solves this problem for me, but I don't have enough 
understanding of the source, to check if its correct:
diff -u mutt-1.5.11/curs_main.c mutt-1.5.11.aa/curs_main.c
--- mutt-1.5.11/curs_main.c     2005-09-07 09:19:43.000000000 +0100
+++ mutt-1.5.11.aa/curs_main.c  2005-11-28 12:33:26.000000000 +0000
@@ -928,6 +928,12 @@
            set_option (OPTSEARCHINVALID);
          }
        }
+       if (menu->menu == MENU_PAGER)
+        {
+          op = OP_DISPLAY_MESSAGE;
+          continue;
+        }
+
        break;

       case OP_TAG:
diff -u mutt-1.5.11/functions.h mutt-1.5.11.aa/functions.h
--- mutt-1.5.11/functions.h     2005-07-24 17:56:42.000000000 +0100
+++ mutt-1.5.11.aa/functions.h  2005-11-28 12:17:24.000000000 +0000
@@ -186,6 +186,8 @@
   { "search-next",     OP_SEARCH_NEXT,                 "n" },
   { "next-thread",     OP_MAIN_NEXT_THREAD,            "\016" },
   { "next-subthread",  OP_MAIN_NEXT_SUBTHREAD,         "\033n" },
+  { "sort-mailbox",            OP_SORT,                        "o" },
+  { "sort-reverse",            OP_SORT_REVERSE,                "O" },
   { "print-message",   OP_PRINT,                       "p" },
   { "previous-thread", OP_MAIN_PREV_THREAD,            "\020" },
   { "previous-subthread",OP_MAIN_PREV_SUBTHREAD,       "\033p" },
>How-To-Repeat:
>Fix:
>Add-To-Audit-Trail:

>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: text/x-diff; name="patch"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="patch"
 
 ZGlmZiAtdSBtdXR0LTEuNS4xMS9jdXJzX21haW4uYyBtdXR0LTEuNS4xMS5hYS9jdXJzX21haW4u
 YwotLS0gbXV0dC0xLjUuMTEvY3Vyc19tYWluLmMJMjAwNS0wOS0wNyAwOToxOTo0My4wMDAwMDAw
 MDAgKzAxMDAKKysrIG11dHQtMS41LjExLmFhL2N1cnNfbWFpbi5jCTIwMDUtMTEtMjggMTI6MzM6
 MjYuMDAwMDAwMDAwICswMDAwCkBAIC05MjgsNiArOTI4LDEyIEBACiAJICAgIHNldF9vcHRpb24g
 KE9QVFNFQVJDSElOVkFMSUQpOwogCSAgfQogCX0KKwlpZiAobWVudS0+bWVudSA9PSBNRU5VX1BB
 R0VSKQorICAgICAgICB7CisgICAgICAgICAgb3AgPSBPUF9ESVNQTEFZX01FU1NBR0U7CisgICAg
 ICAgICAgY29udGludWU7CisgICAgICAgIH0KKwogCWJyZWFrOwogCiAgICAgICBjYXNlIE9QX1RB
 RzoKZGlmZiAtdSBtdXR0LTEuNS4xMS9mdW5jdGlvbnMuaCBtdXR0LTEuNS4xMS5hYS9mdW5jdGlv
 bnMuaAotLS0gbXV0dC0xLjUuMTEvZnVuY3Rpb25zLmgJMjAwNS0wNy0yNCAxNzo1Njo0Mi4wMDAw
 MDAwMDAgKzAxMDAKKysrIG11dHQtMS41LjExLmFhL2Z1bmN0aW9ucy5oCTIwMDUtMTEtMjggMTI6
 MTc6MjQuMDAwMDAwMDAwICswMDAwCkBAIC0xODYsNiArMTg2LDggQEAKICAgeyAic2VhcmNoLW5l
 eHQiLAlPUF9TRUFSQ0hfTkVYVCwJCQkibiIgfSwKICAgeyAibmV4dC10aHJlYWQiLAlPUF9NQUlO
 X05FWFRfVEhSRUFELAkJIlwwMTYiIH0sCiAgIHsgIm5leHQtc3VidGhyZWFkIiwJT1BfTUFJTl9O
 RVhUX1NVQlR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