<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] pattern groups



On Monday, January  9 at 07:55 PM, quoth Thomas Roessler:
To match against a pattern group, use '$' instead of '~'
(better character suggestions would be much appreciated.)

The attached version uses '%' instead.

Cool

Missing features include support for multiple groups in a
single alias / alternates / lists,

Done in the attached version of the patch.

Excellent

I'm thinking of a pair of commands named group / ungroup with
the following syntaxes (Brendan will be able to teach me the
correct plural here ;):

 group -group a -group b -group c -rx a b c -addr d e f -rx h j k
 ungroup -group a -group b -group c -rx a b c -addr d e f

This would re-use the group context code that is now shared
between alias / alternates / lists / subscribe.

The -rx and -addr switches to group and ungroup would switch
between manipulating the regexp and address part of a group.
ungroup would have a special "*" parameter which can be used
without specifying a mode, and would empty the group entirely.

Hmm, I'm somewhat confused. Let's take an example a friend that has multiple addresses that he sends from, but only one address I want to send to him. However, I want all addresses that are attached to him to be in the "friends" group. I'd of course do something like this to start with:

   fcc-save-hook '%C friends' =Friends
   color index red default '%C friends'
   alias -group friends bob Bob <bob@xxxxxxxxxxxxx>

But if he also sometimes uses bob@xxxxxxxxxxx and I want that address to be treated the same... would I do this?

   group -group friends -addr bob@xxxxxxxxxxx

~Kyle
--
I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours.
                                           -- Sir Stephen Henry Roberts

Attachment: pgpDn3wh79ofT.pgp
Description: PGP signature