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

Re: FEATURE: regexp support for lists/subscribe; alternates change



On Mon, Jan 12, 2004 at 11:43:36PM +0100, Thomas Roessler wrote:

> OK, I know that I risk repeating history here -- mostly because no
> archives of the early days of mutt-dev appear to be online, and
> because my own e-mail archives don't go back that long.

...neither does my Mutt experience, so I don't care ;-)

> So I guess
> I'm not entirely sure if my statement in #1466 that the original
> regexp-based list support code was modeled after alternates was
> actually true.

Such a patch would've been perfectly fine for me, but your patch here
also does the trick for me.

> Anyway, here's the proposal: We currently have either regular
> expressions, or lists of strings which are matched against
> identifiers.  I'd like to unify these, at least for some
> configuration settings.  The attached patch does just that, for the
> list commands, and for $alternates; ironically, this returns the
> "alternates" command from the very old days.   With the attached
> patfch, you can say things like this:
> 
>  subscribe ^mutt-.*@mutt.org ^[0-9]*@bugs.guug.de
>  alternates roessler@does-not-exist.(org|net) roessler@xxxxxxxx
> 
> (Of course, strictly speaking, these expressions are too lose, as
> the dots should each be replaced by '\\.'.)

Yeah, I'll need to think a bit about how to use this in my list
configuration generator, but my alternatesrc generator has already been
updated to generate the new syntax (unless the --compat flag is given).

> I'd love to hear your thoughts on this; I have not come to a
> decision, yet, if this is the right way to do things.

Well, I've already applied the patch (the only patch applied to my current
Mutt, incidentally), updated my alternatesrc generator [1], and am in the
middle of thinking about how to update my newlistsrc generator [2] (which
uses my newlists file [3] as input) to take advantage of the patch ... so
I guess you can say I'm sorta crazy about the patch, to put it mildly ;^)

> Flames, comments, and improvements welcome.

Flames suck; this patch rules!

 - Dave

[1]
http://www.bigfatdave.com/dave/mutt/muttdir/makealternatesrc

[2]
http://www.bigfatdave.com/dave/mutt/muttdir/makenewlistsrc

[3]
http://www.bigfatdave.com/dave/mutt/muttdir/newlists

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgpm1q9zGKW5q.pgp
Description: PGP signature