From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46482 Path: main.gmane.org!not-for-mail From: tsuchiya@namazu.org Newsgroups: gmane.emacs.gnus.general Subject: split banners of free mail servers Date: Wed, 11 Sep 2002 13:47:45 +0900 Sender: owner-ding@hpc.uh.edu Message-ID: 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_13:47:45_2002-1" X-Trace: main.gmane.org 1031719806 23196 127.0.0.1 (11 Sep 2002 04:50:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 11 Sep 2002 04:50:06 +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 17ozRz-00061x-00 for ; Wed, 11 Sep 2002 06:50:04 +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 17ozQC-0004AE-00; Tue, 10 Sep 2002 23:48:12 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 10 Sep 2002 23:48:48 -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 XAA11375 for ; Tue, 10 Sep 2002 23:48:35 -0500 (CDT) Original-Received: (qmail 12124 invoked by alias); 11 Sep 2002 04:47:54 -0000 Original-Received: (qmail 12119 invoked from network); 11 Sep 2002 04:47:53 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 11 Sep 2002 04:47:53 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17p00S-0000CD-00 for ; Wed, 11 Sep 2002 07:25:40 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 73 Original-NNTP-Posting-Host: pine.kuee.kyoto-u.ac.jp Original-X-Trace: quimby.gnus.org 1031721940 32394 130.54.208.130 (11 Sep 2002 05:25:40 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 11 Sep 2002 05:25:40 GMT X-cite-me: =?ISO-2022-JP?B?GyRCRVobKEI=?= 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:46482 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46482 --Multipart_Wed_Sep_11_13:47:45_2002-1 Content-Type: text/plain; charset=US-ASCII Hello, Gnus developers. 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. 2002-09-11 TSUCHIYA Masatoshi * gnus-art.el (gnus-article-address-banner-alist): New option. (article-strip-banner): Refer the above option to split banners of free mail servers, when no group parameter is specified. --Multipart_Wed_Sep_11_13:47:45_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 05:17:51 @@ -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,15 @@ (banner (gnus-parameter-banner gnus-newsgroup-name)) (gnus-signature-limit nil) buffer-read-only beg end) + (unless banner + (setq banner + (assoc-default (save-restriction + (widen) + (article-narrow-to-head) + (caar (mail-header-parse-addresses + (mail-fetch-field "from")))) + gnus-article-address-banner-alist + 'string-match))) (when banner (article-goto-body) (cond --Multipart_Wed_Sep_11_13:47:45_2002-1 Content-Type: text/plain; charset=US-ASCII -- TSUCHIYA Masatoshi --Multipart_Wed_Sep_11_13:47:45_2002-1--