From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53038 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.gnus.general Subject: Re: A RE: AW: "collapser", anyone...? Date: Fri, 06 Jun 2003 11:11:02 +0100 Organization: me Sender: ding-owner@lists.math.uh.edu Message-ID: <87vfvjwm6h.fsf@yam.vegetable.demon.co.uk> References: <877k86lmz4.fsf@doohan.bang.priv.no> <87fzmtiirn.fsf@doohan.bang.priv.no> <87n0gx6pfc.fsf@doohan.bang.priv.no> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1054894172 5883 80.91.224.249 (6 Jun 2003 10:09:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 6 Jun 2003 10:09:32 +0000 (UTC) Original-X-From: ding-owner+M1582@lists.math.uh.edu Fri Jun 06 12:09:30 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19OE9s-0001Vu-00 for ; Fri, 06 Jun 2003 12:09:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19OEBn-0003Nl-00; Fri, 06 Jun 2003 05:11:15 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19OEBd-0003Nc-00 for ding@lists.math.uh.edu; Fri, 06 Jun 2003 05:11:05 -0500 Original-Received: (qmail 37560 invoked by alias); 6 Jun 2003 10:11:04 -0000 Original-Received: (qmail 37555 invoked from network); 6 Jun 2003 10:11:04 -0000 Original-Received: from anchor-post-35.mail.demon.net (194.217.242.85) by sclp3.sclp.com with SMTP; 6 Jun 2003 10:11:04 -0000 Original-Received: from vegetable.demon.co.uk ([80.177.16.3] helo=yam.vegetable.demon.co.uk) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 19OEBa-00040G-0Z for ding@gnus.org; Fri, 06 Jun 2003 11:11:02 +0100 Original-Received: from wence by yam.vegetable.demon.co.uk with local (Exim 3.36 #1 (Debian)) id 19OEBa-00004A-00 for ; Fri, 06 Jun 2003 11:11:02 +0100 Original-To: ding@gnus.org X-No-Yes: No Mail-Followup-To: ding@gnus.org In-Reply-To: (Maciej Matysiak's message of "Fri, 06 Jun 2003 06:34:21 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53038 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53038 Maciej Matysiak wrote: [...] > could you please provide an example: how do i get with regexp-opt > the equivalent of "[Aa][Nn][Tt][Ww]\\.?"? maybe it's simpler to use > that function, but one needs to type a lot and think of at least few > possible variations (in this particular case). the above regexp takes > care of everything and doesn't look scary (imho). You don't :). You (let ((case-fold-search t)) ...) in `message-strip-subject-re'. Then you can do things like: (regexp-opt '("antw." "aw" "sv" "re")) => "a\\(?:ntw\\.\\|w\\)\\|re\\|sv" Which I think is certainly easier to read than all the grouping constructs, and, as an extra bonus, it's more efficient at matching. Additionally, this makes it easier to customize `message-subject-re-regexp', since one can just ask for a list of strings, and then do some magic behind the scenes. The user need not know the ins and outs of Emacs' regexps. > i think that the message-subject-re-regexp i've made up with > concatenated regexp is quite readable. but ymmv :) perlist ;). -- lawrence mitchell