From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/20148 Path: main.gmane.org!not-for-mail From: Anders Melchiorsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Getting rid of Subject: prefixes in news postings Date: 08 Jan 1999 04:35:11 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: <0fzp7wi5uy.fsf@humulus.daimi.au.dk> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035158493 16213 80.91.224.250 (21 Oct 2002 00:01:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:01:33 +0000 (UTC) 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 WAA19275 for ; Thu, 7 Jan 1999 22:36:05 -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 VAB03827; Thu, 7 Jan 1999 21:35:38 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 07 Jan 1999 21:35:41 -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 VAA13493 for ; Thu, 7 Jan 1999 21:35:32 -0600 (CST) Original-Received: from eising.k-net.dk (eising.k-net.dk [192.38.208.81]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id WAA19258 for ; Thu, 7 Jan 1999 22:35:24 -0500 (EST) Original-Received: (qmail 29182 invoked from network); 8 Jan 1999 03:35:11 -0000 Original-Received: from carlsberg.kampsax.dtu.dk (qmailr@192.38.212.2) by eising.k-net.dk with SMTP; 8 Jan 1999 03:35:11 -0000 Original-Received: (qmail 16537 invoked from network); 8 Jan 1999 03:35:08 -0000 Original-Received: from k0817.kampsax.dtu.dk (and@192.38.215.249) by carlsberg.kampsax.dtu.dk with SMTP; 8 Jan 1999 03:35:08 -0000 Original-Received: (from and@localhost) by k0817.kampsax.dtu.dk (8.8.7/8.8.7) id EAA05066; Fri, 8 Jan 1999 04:35:11 +0100 Original-To: ding@gnus.org In-Reply-To: Lars Balker Rasmussen's message of "Wed, 06 Jan 1999 19:00:39 GMT" Original-Lines: 33 X-Mailer: Gnus v5.6.45/XEmacs 20.4 - "Emerald" Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:20148 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:20148 Lars Balker Rasmussen writes: > Anders Melchiorsen writes: > > Is there a way to make the Summary buffer chop off uninteresting parts > > of Subject: lines (ie. automatic prefixes identifying mailing lists)? > > How about a variation of > > (defun my-fix-subject () > (save-restriction > (message-narrow-to-headers) > (goto-char (point-min)) > (if (re-search-forward "\\(Subject: Re: \\)\\[[^]]+\\] ") > (replace-match "\\1")))) > (add-hook 'message-setup-hook 'my-fix-subject) For anyone interested, this solved the problem. (defun my-fix-subject () (save-restriction (goto-char (point-min)) (while (re-search-forward "\\[SSLUG[-A-Z]*\\][ \t]*" nil t) (replace-match "")))) (add-hook 'gnus-summary-prepare-hook 'my-fix-subject) I am not certain that I find this solution entirely "clean". But when I figure out a way to make it apply to just the groups which have the problem, I can probably live with it. Thanks! -- Regards, Anders (address is valid)