From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28975 Path: main.gmane.org!not-for-mail From: Gerd Moellmann Newsgroups: gmane.emacs.gnus.general Subject: Re: string-match doesn't honor anchor when START is nonzero Date: 27 Jan 2000 13:53:04 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <86u2jz7k27.fsf@gerd.segv.de> References: <200001261607.RAA07804@online.de> Reply-To: gerd@gnu.org NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035165726 32611 80.91.224.250 (21 Oct 2002 02:02:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:02:06 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, ding@gnus.org Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by mailhost.sclp.com (Postfix) with ESMTP id C0189D051E for ; Thu, 27 Jan 2000 09:27:43 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id IAB29018; Thu, 27 Jan 2000 08:27:18 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 27 Jan 2000 08:26:03 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id IAA24066 for ; Thu, 27 Jan 2000 08:25:52 -0600 (CST) Original-Received: from mout00.kundenserver.de (mout00.kundenserver.de [195.20.224.69]) by mailhost.sclp.com (Postfix) with ESMTP id B82D2D051E for ; Thu, 27 Jan 2000 09:25:46 -0500 (EST) Original-Received: from [195.20.224.75] (helo=mrelay00.kundenserver.de) by mout00.kundenserver.de with esmtp (Exim 2.12 #2) id 12Dprf-00073T-00; Thu, 27 Jan 2000 15:25:39 +0100 Original-Received: from p3e9bd35f.dip0.t-ipconnect.de ([62.155.211.95] helo=online.de) by mrelay00.kundenserver.de with esmtp (Exim 2.12 #2) id 12DprX-00045i-00; Thu, 27 Jan 2000 15:25:31 +0100 Original-Received: (from gerd@localhost) by online.de (8.9.3/8.8.7) id NAA04986; Thu, 27 Jan 2000 13:53:05 +0100 (CET) (envelope-from gerd) Original-To: Jim Meyering In-Reply-To: Jim Meyering's message of "26 Jan 2000 17:34:16 +0100" Original-Lines: 48 User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.5 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:28975 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:28975 Jim Meyering writes: > Gerd Moellmann writes: > | > This illustrates the problem: > | > > | > (setq rmail-dont-reply-to-names "f.") > | > (load "mail-utils") > | > (rmail-dont-reply-to "b, f1, f2, f3, f4, f5, f6") > | > > | > Return value: "b, f2, f4, f6" > | > > | > | Thanks for the test case. Does the following patch solve the problem? > > Thanks for the quick work, but that doesn't quite do it > since it removes only the matching part of the ID. Instead, > it should remove the entire ID. > > Consider this example: > (rmail-dont-reply-to "b, foo1, foo2, no-match") > With your patch, it evaluates to this: > bo1o2, no-match Ah, sorry, you're right. How about this one, applied to the patched version? diff -c -r1.1 mail-utils.el *** mail-utils.el 2000/01/27 12:48:26 1.1 --- mail-utils.el 2000/01/27 12:50:08 *************** *** 226,232 **** ;; Include the human name that precedes . "\\([^\,.<\"]\\|\"[^\"]*\"\\)*" "<\\(" rmail-dont-reply-to-names "\\)" ! "\\)")) (case-fold-search t) pos epos) (while (setq pos (string-match match userids pos)) --- 226,232 ---- ;; Include the human name that precedes . "\\([^\,.<\"]\\|\"[^\"]*\"\\)*" "<\\(" rmail-dont-reply-to-names "\\)" ! "\\)[^,]*")) (case-fold-search t) pos epos) (while (setq pos (string-match match userids pos))