Mutt: move emails only if some emails are tagged

Clash 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?
mutt macro
add a comment |Â
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?
mutt macro
add a comment |Â
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?
mutt macro
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?
mutt macro
asked Jun 15 at 5:54
bilbo_pingouin
1084
1084
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Jun 15 at 17:11
meuh
29.2k11648
29.2k11648
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password