Gnus development mailing list
 help / color / mirror / Atom feed
From: steve@miranova.com (Steven L. Baur)
Subject: Nuking mailing list subject tags (how-to)
Date: 04 Dec 1995 13:47:20 -0800	[thread overview]
Message-ID: <m2wx8cy00n.fsf@diana.miranova.com> (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


             reply	other threads:[~1995-12-04 21:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-04 21:47 Steven L. Baur [this message]
1995-12-05  0:08 ` Jason L Tibbitts III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wx8cy00n.fsf@diana.miranova.com \
    --to=steve@miranova.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).