mutt: a hotkey to return to INBOX?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I assume there's no such default key, am I right?



So, in order to achieve this I have to define something like this?



macro index gi "<change-folder>=INBOX<Enter>" "go to Inbox"
macro browser gi "<exit><Enter><change-folder>=INBOX<Enter>" "go to Inbox"
macro pager gi "<exit><change-folder>=INBOX<Enter>" "go to Inbox"
...


Or may be there's a fancier way? If by any chance you have something related in your configs, I'd be grateful if you could share.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I assume there's no such default key, am I right?



    So, in order to achieve this I have to define something like this?



    macro index gi "<change-folder>=INBOX<Enter>" "go to Inbox"
    macro browser gi "<exit><Enter><change-folder>=INBOX<Enter>" "go to Inbox"
    macro pager gi "<exit><change-folder>=INBOX<Enter>" "go to Inbox"
    ...


    Or may be there's a fancier way? If by any chance you have something related in your configs, I'd be grateful if you could share.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I assume there's no such default key, am I right?



      So, in order to achieve this I have to define something like this?



      macro index gi "<change-folder>=INBOX<Enter>" "go to Inbox"
      macro browser gi "<exit><Enter><change-folder>=INBOX<Enter>" "go to Inbox"
      macro pager gi "<exit><change-folder>=INBOX<Enter>" "go to Inbox"
      ...


      Or may be there's a fancier way? If by any chance you have something related in your configs, I'd be grateful if you could share.










      share|improve this question













      I assume there's no such default key, am I right?



      So, in order to achieve this I have to define something like this?



      macro index gi "<change-folder>=INBOX<Enter>" "go to Inbox"
      macro browser gi "<exit><Enter><change-folder>=INBOX<Enter>" "go to Inbox"
      macro pager gi "<exit><change-folder>=INBOX<Enter>" "go to Inbox"
      ...


      Or may be there's a fancier way? If by any chance you have something related in your configs, I'd be grateful if you could share.







      mutt






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 26 at 12:24









      A S

      1164




      1164




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Yes, you are right. There are no such default keys.

          But you can simplify your calls.



          # Switch between mailboxes (in case you have multiple mailboxes)
          macro index,pager <f2> "<change-folder>+<MAILBOX1>/INBOX<enter>"
          macro index,pager <f3> "<change-folder>+<MAILBOX2>/INBOX<enter>"


          In addition to that I have the sibebar enabled and use the arrow keys to switch folders.



          # Sidebar navigation
          bind index,pager <down> sidebar-next
          bind index,pager <up> sidebar-prev
          bind index,pager <right> sidebar-open


          EDIT: Here can find my whole .muttrc



          EDIT2: Regarding the comment to have conditional mappings: Yes this is possible in case the condition is another mail account. You can have account specific configuration files where you are able to overwrite existing mappings. Load them via a folder hook which get executed as soon as you enter a corresponding folder.



          Put this in your .muttrc



          folder-hook MAILBOX1/* source ~/.mutt/accounts/MAILBOX1
          folder-hook MAILBOX2/* source ~/.mutt/accounts/MAILBOX2


          Create account specific configurations in ~/.mutt/accounts/MAILBOX#



          For example, switch between two different INBOX folders with the same key.



          ~/.mutt/accounts/MAILBOX1 contains:



          macro index,pager <f2> "<change-folder>+MAILBOX2/INBOX<enter>"


          ~/.mutt/accounts/MAILBOX2 contains:



          macro index,pager <f2> "<change-folder>+MAILBOX1/INBOX<enter>"





          share|improve this answer






















          • Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
            – A S
            Aug 27 at 14:15






          • 1




            You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
            – ploth
            Aug 27 at 17:49

















          up vote
          2
          down vote













          macro index H g!rm
          macro index S g=sentrm
          macro index V g!!rm


          is what I have to go to the "home", "sent", or "previous" mailbox via "g" (change-folder). You may or may not need the "m" (move entry to middle of screen) at the end.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464911%2fmutt-a-hotkey-to-return-to-inbox%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            Yes, you are right. There are no such default keys.

            But you can simplify your calls.



            # Switch between mailboxes (in case you have multiple mailboxes)
            macro index,pager <f2> "<change-folder>+<MAILBOX1>/INBOX<enter>"
            macro index,pager <f3> "<change-folder>+<MAILBOX2>/INBOX<enter>"


            In addition to that I have the sibebar enabled and use the arrow keys to switch folders.



            # Sidebar navigation
            bind index,pager <down> sidebar-next
            bind index,pager <up> sidebar-prev
            bind index,pager <right> sidebar-open


            EDIT: Here can find my whole .muttrc



            EDIT2: Regarding the comment to have conditional mappings: Yes this is possible in case the condition is another mail account. You can have account specific configuration files where you are able to overwrite existing mappings. Load them via a folder hook which get executed as soon as you enter a corresponding folder.



            Put this in your .muttrc



            folder-hook MAILBOX1/* source ~/.mutt/accounts/MAILBOX1
            folder-hook MAILBOX2/* source ~/.mutt/accounts/MAILBOX2


            Create account specific configurations in ~/.mutt/accounts/MAILBOX#



            For example, switch between two different INBOX folders with the same key.



            ~/.mutt/accounts/MAILBOX1 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX2/INBOX<enter>"


            ~/.mutt/accounts/MAILBOX2 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX1/INBOX<enter>"





            share|improve this answer






















            • Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
              – A S
              Aug 27 at 14:15






            • 1




              You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
              – ploth
              Aug 27 at 17:49














            up vote
            1
            down vote



            accepted










            Yes, you are right. There are no such default keys.

            But you can simplify your calls.



            # Switch between mailboxes (in case you have multiple mailboxes)
            macro index,pager <f2> "<change-folder>+<MAILBOX1>/INBOX<enter>"
            macro index,pager <f3> "<change-folder>+<MAILBOX2>/INBOX<enter>"


            In addition to that I have the sibebar enabled and use the arrow keys to switch folders.



            # Sidebar navigation
            bind index,pager <down> sidebar-next
            bind index,pager <up> sidebar-prev
            bind index,pager <right> sidebar-open


            EDIT: Here can find my whole .muttrc



            EDIT2: Regarding the comment to have conditional mappings: Yes this is possible in case the condition is another mail account. You can have account specific configuration files where you are able to overwrite existing mappings. Load them via a folder hook which get executed as soon as you enter a corresponding folder.



            Put this in your .muttrc



            folder-hook MAILBOX1/* source ~/.mutt/accounts/MAILBOX1
            folder-hook MAILBOX2/* source ~/.mutt/accounts/MAILBOX2


            Create account specific configurations in ~/.mutt/accounts/MAILBOX#



            For example, switch between two different INBOX folders with the same key.



            ~/.mutt/accounts/MAILBOX1 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX2/INBOX<enter>"


            ~/.mutt/accounts/MAILBOX2 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX1/INBOX<enter>"





            share|improve this answer






















            • Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
              – A S
              Aug 27 at 14:15






            • 1




              You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
              – ploth
              Aug 27 at 17:49












            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            Yes, you are right. There are no such default keys.

            But you can simplify your calls.



            # Switch between mailboxes (in case you have multiple mailboxes)
            macro index,pager <f2> "<change-folder>+<MAILBOX1>/INBOX<enter>"
            macro index,pager <f3> "<change-folder>+<MAILBOX2>/INBOX<enter>"


            In addition to that I have the sibebar enabled and use the arrow keys to switch folders.



            # Sidebar navigation
            bind index,pager <down> sidebar-next
            bind index,pager <up> sidebar-prev
            bind index,pager <right> sidebar-open


            EDIT: Here can find my whole .muttrc



            EDIT2: Regarding the comment to have conditional mappings: Yes this is possible in case the condition is another mail account. You can have account specific configuration files where you are able to overwrite existing mappings. Load them via a folder hook which get executed as soon as you enter a corresponding folder.



            Put this in your .muttrc



            folder-hook MAILBOX1/* source ~/.mutt/accounts/MAILBOX1
            folder-hook MAILBOX2/* source ~/.mutt/accounts/MAILBOX2


            Create account specific configurations in ~/.mutt/accounts/MAILBOX#



            For example, switch between two different INBOX folders with the same key.



            ~/.mutt/accounts/MAILBOX1 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX2/INBOX<enter>"


            ~/.mutt/accounts/MAILBOX2 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX1/INBOX<enter>"





            share|improve this answer














            Yes, you are right. There are no such default keys.

            But you can simplify your calls.



            # Switch between mailboxes (in case you have multiple mailboxes)
            macro index,pager <f2> "<change-folder>+<MAILBOX1>/INBOX<enter>"
            macro index,pager <f3> "<change-folder>+<MAILBOX2>/INBOX<enter>"


            In addition to that I have the sibebar enabled and use the arrow keys to switch folders.



            # Sidebar navigation
            bind index,pager <down> sidebar-next
            bind index,pager <up> sidebar-prev
            bind index,pager <right> sidebar-open


            EDIT: Here can find my whole .muttrc



            EDIT2: Regarding the comment to have conditional mappings: Yes this is possible in case the condition is another mail account. You can have account specific configuration files where you are able to overwrite existing mappings. Load them via a folder hook which get executed as soon as you enter a corresponding folder.



            Put this in your .muttrc



            folder-hook MAILBOX1/* source ~/.mutt/accounts/MAILBOX1
            folder-hook MAILBOX2/* source ~/.mutt/accounts/MAILBOX2


            Create account specific configurations in ~/.mutt/accounts/MAILBOX#



            For example, switch between two different INBOX folders with the same key.



            ~/.mutt/accounts/MAILBOX1 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX2/INBOX<enter>"


            ~/.mutt/accounts/MAILBOX2 contains:



            macro index,pager <f2> "<change-folder>+MAILBOX1/INBOX<enter>"






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 27 at 18:03

























            answered Aug 27 at 8:31









            ploth

            848115




            848115











            • Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
              – A S
              Aug 27 at 14:15






            • 1




              You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
              – ploth
              Aug 27 at 17:49
















            • Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
              – A S
              Aug 27 at 14:15






            • 1




              You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
              – ploth
              Aug 27 at 17:49















            Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
            – A S
            Aug 27 at 14:15




            Thanks! BTW, I understand, it's not possible in any way to have a conditional mapping? Like, if in index but the active folder is not INBOX, then do A, and if in index AND in INBOX, then do B. Right?
            – A S
            Aug 27 at 14:15




            1




            1




            You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
            – ploth
            Aug 27 at 17:49




            You can even do that iff your condition relates to another mailbox (second mail account). You can have account specific configuration files where you can overwrite existing mappings. I edit my answer.
            – ploth
            Aug 27 at 17:49












            up vote
            2
            down vote













            macro index H g!rm
            macro index S g=sentrm
            macro index V g!!rm


            is what I have to go to the "home", "sent", or "previous" mailbox via "g" (change-folder). You may or may not need the "m" (move entry to middle of screen) at the end.






            share|improve this answer
























              up vote
              2
              down vote













              macro index H g!rm
              macro index S g=sentrm
              macro index V g!!rm


              is what I have to go to the "home", "sent", or "previous" mailbox via "g" (change-folder). You may or may not need the "m" (move entry to middle of screen) at the end.






              share|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                macro index H g!rm
                macro index S g=sentrm
                macro index V g!!rm


                is what I have to go to the "home", "sent", or "previous" mailbox via "g" (change-folder). You may or may not need the "m" (move entry to middle of screen) at the end.






                share|improve this answer












                macro index H g!rm
                macro index S g=sentrm
                macro index V g!!rm


                is what I have to go to the "home", "sent", or "previous" mailbox via "g" (change-folder). You may or may not need the "m" (move entry to middle of screen) at the end.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 26 at 15:23









                thrig

                22.9k12854




                22.9k12854



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464911%2fmutt-a-hotkey-to-return-to-inbox%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay