Implement two kinds of filtering in Edwin's simple news reader:
authorTaylor R. Campbell <net/mumble/campbell>
Mon, 12 Jun 2006 20:46:28 +0000 (20:46 +0000)
committerTaylor R. Campbell <net/mumble/campbell>
Mon, 12 Jun 2006 20:46:28 +0000 (20:46 +0000)
commit2e8541cf15b98bd4e92e6af2b6b126c93ac749e9
treec11a027ac5de129896a2f31c14c0b7ecb0d503b8
parent14e7423b76e40b4a6cf6c98f945f789a557b43e2
Implement two kinds of filtering in Edwin's simple news reader:
filtering out messages that match criteria, such as spam; and
filtering headers of kept messages.

See the documentation strings for the new Edwin variables
NEWS-HEADER-FILTER and NEWS-KEPT-HEADERS.  New procedures
NEWS-HEADER-SPLITTING-FILTER and NEWS-HEADER-REGEXP-FILTER are useful
for constructing the value of NEWS-HEADER-FILTER.  For example,
I have this in my .edwin, so that any messages with xref headers
whose values contain `gmane.spam.detected' on any Gmane news servers
will be ignored:

  (add-event-receiver! (ref-variable news-group-mode-hook)
    (let ((gmane-spam-filter
           (news-header-regexp-filter
            '(("xref" . ".*gmane\\.spam\\.detected.*")))))
      (lambda (buffer)
        (if (string-prefix? "gmane." (buffer-name buffer))
            (local-set-variable! news-header-filter
                                 gmane-spam-filter
                                 buffer)))))
v7/src/edwin/edwin.pkg
v7/src/edwin/snr.scm