Abort macro if limit pattern does not match anything

Cameron Simpson cs at cskk.id.au
Wed Nov 30 20:41:38 UTC 2022


On 30Nov2022 08:13, Kai Weber <kai.weber at glorybox.de> wrote:
>* Max G�rner <max at familie-goerner.eu>:
>
>> Is there a way to abort the macro if the pattern does not match anything? It
>> is quite annoying to tidy up after the macro every now and then.
>
>Have a look at <tag-prefix-cond>

As an example, my folder hooks have this:

     folder-hook .         'push "<tag-pattern>~P~N<enter><tag-prefix-cond><clear-flag>N<untag-pattern>~T<enter><end-cond>"'

which marks all "NEW" messages from me as not new.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Mutt-users mailing list