From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46484 Path: main.gmane.org!not-for-mail From: tsuchiya@namazu.org Newsgroups: gmane.emacs.gnus.general Subject: Re: split banners of free mail servers Date: Wed, 11 Sep 2002 14:30:59 +0900 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: multipart/mixed; boundary="Multipart_Wed_Sep_11_14:30:59_2002-1" X-Trace: main.gmane.org 1031722336 27257 127.0.0.1 (11 Sep 2002 05:32:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 11 Sep 2002 05:32:16 +0000 (UTC) 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 17p06p-00075V-00 for ; Wed, 11 Sep 2002 07:32:15 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17p05z-0004ZX-00; Wed, 11 Sep 2002 00:31:23 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 11 Sep 2002 00:31:58 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id AAA11546 for ; Wed, 11 Sep 2002 00:31:46 -0500 (CDT) Original-Received: (qmail 12858 invoked by alias); 11 Sep 2002 05:31:05 -0000 Original-Received: (qmail 12853 invoked from network); 11 Sep 2002 05:31:04 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 11 Sep 2002 05:31:04 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17p0gI-0001Cs-00 for ; Wed, 11 Sep 2002 08:08:54 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 78 Original-NNTP-Posting-Host: pine.kuee.kyoto-u.ac.jp Original-X-Trace: quimby.gnus.org 1031724534 4291 130.54.208.130 (11 Sep 2002 06:08:54 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 11 Sep 2002 06:08:54 GMT User-Agent: T-gnus/6.15.8 (based on Oort Gnus v0.08) (revision 01) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46484 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46484 --Multipart_Wed_Sep_11_14:30:59_2002-1 Content-Type: text/plain; charset=US-ASCII >> On Wed, 11 Sep 2002 14:18:05 +0900 >> yamaoka@jpl.org (Katsumi Yamaoka) said as follows: >> Some mail servers, which provide free mail accounts, insert their >> advertisements into their relaying messages. In order to split >> them, I propose the following change. >That's a good feature. But... >> + (assoc-default (save-restriction >I noticed just now that the function `assoc-default' is not available >in XEmacs without APEL. I see. Here is the revised patch. --Multipart_Wed_Sep_11_14:30:59_2002-1 Content-Type: text/plain; charset=US-ASCII Index: gnus-art.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v retrieving revision 6.231 diff -u -u -r6.231 gnus-art.el --- gnus-art.el 2002/09/09 15:24:16 6.231 +++ gnus-art.el 2002/09/11 06:03:52 @@ -279,6 +279,21 @@ A string is used as a regular expression to match the banner directly.") +(defcustom gnus-article-address-banner-alist nil + "*Banner alist for free mail addresses. +For example, + ((\"@yahoo\\.co\\.jp\\\\'\" . \"\\n_+\\nDo You Yahoo!\\\\?\\n.*\\n.*\\n\")) +" + :type '(repeat + (cons + (regexp :tag "Address") + (choice :tag "Banner" :value nil + (const :tag "Remove signature" signature) + (symbol :tag "Item in `gnus-article-banner-alist'" none) + regexp + (const :tag "None" nil)))) + :group 'gnus-article-washing) + (defcustom gnus-emphasis-alist (let ((format "\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)") @@ -2252,6 +2267,17 @@ (banner (gnus-parameter-banner gnus-newsgroup-name)) (gnus-signature-limit nil) buffer-read-only beg end) + (unless banner + (setq banner + (let ((from (save-restriction + (widen) + (article-narrow-to-head) + (caar (mail-header-parse-addresses + (mail-fetch-field "from")))))) + (catch 'found + (dolist (pair gnus-article-address-banner-alist) + (when (string-match (car pair) from) + (throw 'found (cdr pair)))))))) (when banner (article-goto-body) (cond --Multipart_Wed_Sep_11_14:30:59_2002-1 Content-Type: text/plain; charset=US-ASCII -- TSUCHIYA Masatoshi --Multipart_Wed_Sep_11_14:30:59_2002-1--