Abort macro if limit pattern does not match anything
Dave Ewart
davee at sungate.co.uk
Thu Dec 1 10:44:21 UTC 2022
On Thursday, 01.12.2022 at 07:41 +1100, Cameron Simpson wrote:
> 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.
This approach also helpfully puts the message "Nothing to do" in the status
message, which is very handy.
Cheers,
Dave.
--
Dave Ewart, davee at sungate.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1528 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20221201/8cd08f60/attachment.asc>
More information about the Mutt-users
mailing list