Gnus development mailing list
 help / color / Atom feed
From: Sam Steingold <>
Subject: scoring role for all but a few groups
Date: Tue, 07 Jan 2020 11:58:42 -0500
Message-ID: <> (raw)

I have a couple of scoring rules that I want to be applied to _all_
groups _except_ for a handful of others.

(e.g., kill all non-ASCII subjects _except_ for 1 non-ASCII group or
up-score new threads _except_ for groups like reddit and slashdot where
_every_ message is a new thread).

I tried adding the general rule into the global score file and the
opposite rule into the file relevant only to the "except" groups, but it
did not work (

It looks like I have to put the rule

--8<---------------cut here---------------start------------->8---
(("references" ("" 1000 nil e))) ; new thread
--8<---------------cut here---------------end--------------->8---

into a separate file `new-thread` and this

--8<---------------cut here---------------start------------->8---
(add-hook 'gnus-score-find-score-files-function 'sds-gnus-upscore-new-thread)
(defun sds-gnus-upscore-new-thread (group)
  (and (not (string-match "\\.\\(news\\|slashdot\\|announce\\)" group)) '("new-thread")))
--8<---------------cut here---------------end--------------->8---

to `.emacs`

This seems like an ugly solution
(at the very least I wish I could put the rules in the function body,
but it does not work despite the doc saying it should).

Any better suggestions?


Sam Steingold ( on darwin Ns 10.3.1671
XML is like violence. If it doesn't solve the problem, use more.

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Gnus development mailing list

Archives are clonable: git clone --mirror

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone