From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/20184 Path: main.gmane.org!not-for-mail From: Alan Shutko Newsgroups: gmane.emacs.gnus.general Subject: Re: Followup to names with commas Date: 09 Jan 1999 09:47:15 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035158522 16385 80.91.224.250 (21 Oct 2002 00:02:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:02:02 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id KAA28489 for ; Sat, 9 Jan 1999 10:51:35 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id JAB13908; Sat, 9 Jan 1999 09:49:57 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 09 Jan 1999 09:50:03 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id JAA04414 for ; Sat, 9 Jan 1999 09:49:51 -0600 (CST) Original-Received: from wugate.wustl.edu (wugate.wustl.edu [128.252.120.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id KAA28443 for ; Sat, 9 Jan 1999 10:49:44 -0500 (EST) Original-Received: from nb22-pool-13.wustl.edu (ats@nb22-pool-16.wustl.edu [128.252.113.16]) by wugate.wustl.edu (8.8.8/8.8.5) with ESMTP id JAA23261; Sat, 9 Jan 1999 09:49:23 -0600 (CST) Original-Received: (from ats@localhost) by nb22-pool-13.wustl.edu (8.8.7/8.8.7) id JAA00331; Sat, 9 Jan 1999 09:47:17 -0600 Original-To: Anders Melchiorsen Mail-Copies-To: never In-Reply-To: Anders Melchiorsen's message of "09 Jan 1999 00:02:54 +0100" Original-Lines: 66 X-Mailer: Gnus v5.6.42/Emacs 20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:20184 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:20184 >>>>> "A" == Anders Melchiorsen writes: A> I just received a mail with approximately the following To: A> header... To: "Melchiorsen, Anders" Iirc, that was a bug in rmail-dont-reply-to, and should be fixed in recent Emacsen. The patch probably didn't filter back to XEmacs. Try putting this somewhere and using it (current one from Emacs). Someone should probably mention this to the XEmacs people. (defun rmail-dont-reply-to (userids) "Returns string of mail addresses USERIDS sans any recipients that start with matches for `rmail-dont-reply-to-names'. Usenet paths ending in an element that matches are removed also." (if (null rmail-dont-reply-to-names) (setq rmail-dont-reply-to-names (concat (if rmail-default-dont-reply-to-names (concat rmail-default-dont-reply-to-names "\\|") "") (concat (regexp-quote (user-login-name)) "\\>")))) (let ((match (concat "\\(^\\|,\\)[ \t\n]*" ;; Can anyone figure out what this is for? ;; Is it an obsolete remnant of another way of ;; handling Foo Bar ? "\\([^,\n]*[!<]\\|\\)" "\\(" rmail-dont-reply-to-names "\\|" ;; 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)) (if (> pos 0) (setq pos (match-beginning 2))) (setq epos ;; Delete thru the next comma, plus whitespace after. (if (string-match ",[ \t\n]*" userids (match-end 0)) (match-end 0) (length userids))) ;; Count the double-quotes since the beginning of the list. ;; Reject this match if it is inside a pair of doublequotes. (let (quote-pos inside-quotes) (while (and (setq quote-pos (string-match "\"" userids quote-pos)) (< quote-pos pos)) (setq quote-pos (1+ quote-pos)) (setq inside-quotes (not inside-quotes))) (if inside-quotes ;; Advance to next even-parity quote, and scan from there. (setq pos (string-match "\"" userids pos)) (setq userids (mail-string-delete userids pos epos))))) ;; get rid of any trailing commas (if (setq pos (string-match "[ ,\t\n]*\\'" userids)) (setq userids (substring userids 0 pos))) ;; remove leading spaces. they bother me. (if (string-match "\\s *" userids) (substring userids (match-end 0)) userids))) -- Alan Shutko - By consent of the corrupted Love means nothing to a tennis player.