Gnus development mailing list
 help / color / mirror / Atom feed
* Nuking mailing list subject tags (how-to)
@ 1995-12-04 21:47 Steven L. Baur
  1995-12-05  0:08 ` Jason L Tibbitts III
  0 siblings, 1 reply; 2+ messages in thread
From: Steven L. Baur @ 1995-12-04 21:47 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Nuking mailing list subject tags (how-to)
  1995-12-04 21:47 Nuking mailing list subject tags (how-to) Steven L. Baur
@ 1995-12-05  0:08 ` Jason L Tibbitts III
  0 siblings, 0 replies; 2+ messages in thread
From: Jason L Tibbitts III @ 1995-12-05  0:08 UTC (permalink / raw)


>>>>> "SLB" == Steven L Baur <steve@miranova.com> writes:

SLB> Ever been on a mailing list where the list owner thinks its a Great
SLB> Idea to put the mailing list name in the Subject: line?

I do that on every list that I run.  It's a great help for those who don't
have such great software as Gnus and Procmail, and if you have such cool
software then getting rid of the tags is trivial.  They're a big help if
you don't have the software and they can go away if you do have it.  Why is
that so annoying?

SLB> Here's a demonstration function that attaches to
SLB> nnml-prepare-save-mail-hook to illustrate how to nuke those annoying,
SLB> obnoxious and ugly tags out of existence.  Permanently.

For Procmail users, I use the following in a recipe:

        :0 h
        SUBJECT=| formail -xSubject: | sed 's/TAG: //'

        :0 fhw
        |formail -i "Subject:" -a "Subject:$SUBJECT"

Procmail gurus will probably find subtle weird locking errors, but it's
always worked for me.

 - J<


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-12-05  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-12-04 21:47 Nuking mailing list subject tags (how-to) Steven L. Baur
1995-12-05  0:08 ` Jason L Tibbitts III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).