more general hooks to handle similar mailing lists
Kevin J. McCarthy
kevin at 8t8.us
Sun Oct 11 16:47:26 UTC 2020
On Sun, Oct 11, 2020 at 08:08:07AM +0200, Claus Assmann wrote:
>I'm trying to use a more generic approach for some patterns
>to handle mailing list, e.g., something like:
>
>save-hook "~C ietf-\\([a-z0-9]+\\)@ietf.org" =%1
>
>instead of having one entry for each mailing list.
>Is that possible with the current mutt features?
No, that's not possible right now. The regexec() is inside the pattern
modifier processor (e.g. ~C). The save-hook mailbox evaluation takes
place far removed from there, preventing easy access to the back
reference structure as well as the string the back reference would apply
to.
Additionally, nothing prevents multiple patterns modifiers with a
regexp.
>It seems that back-references in regular expressions can only
>be used for "spam":
>spam pattern format
The "pattern" argument for spam isn't really a pattern, it's a regexp.
The regexec() matching and format generation take place in the same
place for the spam command, so it's easy to process back references.
--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20201011/fa594d93/attachment.asc>
More information about the Mutt-users
mailing list