From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4259 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: Nuking mailing list subject tags (how-to) Date: 04 Dec 1995 13:47:20 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.28) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035145031 29020 80.91.224.250 (20 Oct 2002 20:17:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:17:11 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id OAA27836 for ; Mon, 4 Dec 1995 14:27:59 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 4 Dec 1995 22:47:04 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id NAA27496; Mon, 4 Dec 1995 13:47:22 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ Original-Lines: 35 X-Mailer: September Gnus v0.17/XEmacs 19.13 Xref: main.gmane.org gmane.emacs.gnus.general:4259 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4259 While we're discussing Gnus & Mail I'd like to add a little Gnus Magic. Ever been on a mailing list where the list owner thinks its a Great Idea to put the mailing list name in the Subject: line? Here's a demonstration function that attaches to nnml-prepare-save-mail-hook to illustrate how to nuke those annoying, obnoxious and ugly tags out of existence. Permanently. Customize to suit. If the crossposting feature is being used, then all the crossposted nnml groups must be extracted out of group-art. This function only uses the first one. (defun steves-nnml-prepare-save-mail-hook () "Wipe out damned annoying, obnoxious, and ugly mailing list subject tags. The Final Solution!" (let ((group (car (car group-art)))) (if (not (string-match "hwg-main\\|faqbook" group )) nil (let ((dest "") (src (cond ((string= group "hwg-main") "\\[ *hwg-main *\\] *") ((string= group "faqbook") "\\[faqbook\\] *") (t "I'm A Stupid Blathering MSDOS MORON!!!")))) (save-excursion (save-restriction (if (re-search-forward "^Subject: " nil t) (progn (narrow-to-region (gnus-point-at-bol) (gnus-point-at-eol)) (if (re-search-forward src nil t) (replace-match dest)))))))))) (add-hook 'nnml-prepare-save-mail-hook 'steves-nnml-prepare-save-mail-hook) -- steve@miranova.com baur