Mutt: move emails only if some emails are tagged

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











up vote
1
down vote

favorite












I use mutt and I like to sort out some emails from various mailing lists. I still like them to come to my inbox, but when read, I want to move them somehow automatically.



Currently, I do the following:



  • Select the mails matching a pattern, e.g.: T~f facebook.com

  • Move them to some place: ;s=Facebook

I made some macros to avoid typing it by myself. However I still need to do the two separate steps. And considering that I have a few different mailing lists (say, LinkedIn as well), that's two steps for each list.



I would like to reduce it in a single step, that is to say one command (macro) to select a few messages based on the pattern and move them.



The problem is that ;s does not check if some mails are already tagged. So that if none are tagged, it will move the current mail. How could I add some condition to ;s to do nothing if no tag is set?







share|improve this question























    up vote
    1
    down vote

    favorite












    I use mutt and I like to sort out some emails from various mailing lists. I still like them to come to my inbox, but when read, I want to move them somehow automatically.



    Currently, I do the following:



    • Select the mails matching a pattern, e.g.: T~f facebook.com

    • Move them to some place: ;s=Facebook

    I made some macros to avoid typing it by myself. However I still need to do the two separate steps. And considering that I have a few different mailing lists (say, LinkedIn as well), that's two steps for each list.



    I would like to reduce it in a single step, that is to say one command (macro) to select a few messages based on the pattern and move them.



    The problem is that ;s does not check if some mails are already tagged. So that if none are tagged, it will move the current mail. How could I add some condition to ;s to do nothing if no tag is set?







    share|improve this question





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I use mutt and I like to sort out some emails from various mailing lists. I still like them to come to my inbox, but when read, I want to move them somehow automatically.



      Currently, I do the following:



      • Select the mails matching a pattern, e.g.: T~f facebook.com

      • Move them to some place: ;s=Facebook

      I made some macros to avoid typing it by myself. However I still need to do the two separate steps. And considering that I have a few different mailing lists (say, LinkedIn as well), that's two steps for each list.



      I would like to reduce it in a single step, that is to say one command (macro) to select a few messages based on the pattern and move them.



      The problem is that ;s does not check if some mails are already tagged. So that if none are tagged, it will move the current mail. How could I add some condition to ;s to do nothing if no tag is set?







      share|improve this question











      I use mutt and I like to sort out some emails from various mailing lists. I still like them to come to my inbox, but when read, I want to move them somehow automatically.



      Currently, I do the following:



      • Select the mails matching a pattern, e.g.: T~f facebook.com

      • Move them to some place: ;s=Facebook

      I made some macros to avoid typing it by myself. However I still need to do the two separate steps. And considering that I have a few different mailing lists (say, LinkedIn as well), that's two steps for each list.



      I would like to reduce it in a single step, that is to say one command (macro) to select a few messages based on the pattern and move them.



      The problem is that ;s does not check if some mails are already tagged. So that if none are tagged, it will move the current mail. How could I add some condition to ;s to do nothing if no tag is set?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jun 15 at 5:54









      bilbo_pingouin

      1084




      1084




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          I'm not a mutt user, but it looks like tag-prefix-cond can do this. It is like tag-prefix but if there aren't any tagged
          messages, the command buffer is flushed without doing anything (in
          other words, whatever hook you're in stops dead in its tracks)
          , from this mutt-users@mutt.org archive.






          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%2f449937%2fmutt-move-emails-only-if-some-emails-are-tagged%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote



            accepted










            I'm not a mutt user, but it looks like tag-prefix-cond can do this. It is like tag-prefix but if there aren't any tagged
            messages, the command buffer is flushed without doing anything (in
            other words, whatever hook you're in stops dead in its tracks)
            , from this mutt-users@mutt.org archive.






            share|improve this answer

























              up vote
              2
              down vote



              accepted










              I'm not a mutt user, but it looks like tag-prefix-cond can do this. It is like tag-prefix but if there aren't any tagged
              messages, the command buffer is flushed without doing anything (in
              other words, whatever hook you're in stops dead in its tracks)
              , from this mutt-users@mutt.org archive.






              share|improve this answer























                up vote
                2
                down vote



                accepted







                up vote
                2
                down vote



                accepted






                I'm not a mutt user, but it looks like tag-prefix-cond can do this. It is like tag-prefix but if there aren't any tagged
                messages, the command buffer is flushed without doing anything (in
                other words, whatever hook you're in stops dead in its tracks)
                , from this mutt-users@mutt.org archive.






                share|improve this answer













                I'm not a mutt user, but it looks like tag-prefix-cond can do this. It is like tag-prefix but if there aren't any tagged
                messages, the command buffer is flushed without doing anything (in
                other words, whatever hook you're in stops dead in its tracks)
                , from this mutt-users@mutt.org archive.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jun 15 at 17:11









                meuh

                29.2k11648




                29.2k11648






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449937%2fmutt-move-emails-only-if-some-emails-are-tagged%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)