From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5415 Path: main.gmane.org!not-for-mail From: Mark Borges Newsgroups: gmane.emacs.gnus.general Subject: Re: September Gnus 0.48 is released Date: 01 Mar 1996 20:04:47 -0700 Organization: CIRES, University of Colorado Sender: mdb@cdc.noaa.gov Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035146021 32734 80.91.224.250 (20 Oct 2002 20:33:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:33:41 +0000 (UTC) Cc: Steven L Baur Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.3/8.6.9) with SMTP id TAA27147 for ; Fri, 1 Mar 1996 19:34:31 -0800 Original-Received: from cdc.noaa.gov (manager.Colorado.EDU [128.138.218.210]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sat, 2 Mar 1996 04:05:02 +0100 Original-Received: from roberts by cdc.noaa.gov (SMI-8.6/SMI-SVR4) id UAA21841; Fri, 1 Mar 1996 20:04:47 -0700 Original-Received: by roberts (5.0) id AA21571; Fri, 1 Mar 1996 20:04:48 -0700 Original-To: ding@ifi.uio.no X-Attribution: mb In-Reply-To: Steven L Baur's message of 29 Feb 1996 11:25:35 -0800 Original-Lines: 86 Xref: main.gmane.org gmane.emacs.gnus.general:5415 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5415 >> On 29 Feb 1996 11:25:35 -0800, >> Steven L Baur(sb) wrote: sb> The following patch works around this problem. A 19.14 beta sb> tester should check to see if mail-strip-quoted-names (in sb> utils/mail-utils.el) still has the same bug. Maybe. The defun from 19.14-beta12 is appended below (I'm not sure what I'm looking for). If it is a bug/incompatability, could you please let us know. Thanks, -mb- (defun mail-strip-quoted-names (address) "Delete comments and quoted strings in an address list ADDRESS. Also delete leading/trailing whitespace and replace FOO with just BAR. Return a modified address list." (if (null address) nil (if mail-use-rfc822 (progn (require 'rfc822) (mapconcat 'identity (rfc822-addresses address) ", ")) (let (pos) (string-match "\\`[ \t\n]*" address) ;; strip surrounding whitespace (setq address (substring address (match-end 0) (string-match "[ \t\n]*\\'" address (match-end 0)))) ;; Detect nested comments. (if (string-match "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*(" address) ;; Strip nested comments. (save-excursion (set-buffer (get-buffer-create " *temp*")) (erase-buffer) (insert address) (set-syntax-table lisp-mode-syntax-table) (goto-char 1) (while (search-forward "(" nil t) (forward-char -1) (skip-chars-backward " \t") (delete-region (point) (save-excursion (condition-case () (forward-sexp 1) (error (goto-char (point-max)))) (point)))) (setq address (buffer-string)) (erase-buffer)) ;; Strip non-nested comments an easier way. (while (setq pos (string-match ;; This doesn't hack rfc822 nested comments ;; `(xyzzy (foo) whinge)' properly. Big deal. "[ \t]*(\\([^)\"\\]\\|\\\\.\\|\\\\\n\\)*)" address)) (setq address (mail-string-delete address pos (match-end 0))))) ;; strip `quoted' names (This is supposed to hack `"Foo Bar" ') (setq pos 0) (while (setq pos (string-match "[ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*" address pos)) ;; If the next thing is "@", we have "foo bar"@host. Leave it. (if (and (> (length address) (match-end 0)) (= (aref address (match-end 0)) ?@)) (setq pos (match-end 0)) (setq address (mail-string-delete address pos (match-end 0))))) ;; Retain only part of address in <> delims, if there is such a thing. (while (setq pos (string-match "\\(,\\s-*\\|\\`\\)[^,]*<\\([^>,]*>\\)" address)) (let ((junk-beg (match-end 1)) (junk-end (match-beginning 2)) (close (match-end 0))) (setq address (mail-string-delete address (1- close) close)) (setq address (mail-string-delete address junk-beg junk-end)))) address)))) (or (and (boundp 'rmail-default-dont-reply-to-names) (not (null rmail-default-dont-reply-to-names))) (setq rmail-default-dont-reply-to-names "info-"))