Gnus development mailing list
 help / color / Atom feed
* scoring role for all but a few groups
@ 2020-01-07 16:58 Sam Steingold
  0 siblings, 0 replies; only message in thread
From: Sam Steingold @ 2020-01-07 16:58 UTC (permalink / raw)
  To: ding

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 16:58 scoring role for all but a few groups Sam Steingold

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