info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decay scoring: Limit to adaptive score-files?


From: Reiner Steib
Subject: Re: Decay scoring: Limit to adaptive score-files?
Date: Sat, 11 Dec 2004 23:00:10 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

On Sat, Dec 11 2004, Peter G. wrote:

> What I think I need: My decays limited to the *.ADAPT files, since I
> would love my manually/interactively added scores (*.SCORE files) not to
> decay.

Set `gnus-decay-scores' to "\\.ADAPT\\'" and try the following patch.
Does it work?

--8<---------------cut here---------------start------------->8---
--- gnus-score.el       06 Dec 2004 17:16:40 +0100      6.38
+++ gnus-score.el       11 Dec 2004 22:50:44 +0100      
@@ -146,9 +146,15 @@
   :type 'boolean)
 
 (defcustom gnus-decay-scores nil
-  "*If non-nil, decay non-permanent scores."
+  "*If non-nil, decay non-permanent scores.
+
+If it is a string, only decay score files matching string."
   :group 'gnus-score-decay
-  :type 'boolean)
+  :type `(choice (const :tag "never" nil)
+                (const :tag "always" t)
+                (const :tag "adapt"
+                       ,(concat "\\." gnus-adaptive-file-suffix "\\'"))
+                (regexp)))
 
 (defcustom gnus-decay-score-function 'gnus-decay-score
   "*Function called to decay a score.
@@ -1210,7 +1208,9 @@
          (decay (car (gnus-score-get 'decay alist)))
          (eval (car (gnus-score-get 'eval alist))))
       ;; Perform possible decays.
-      (when (and gnus-decay-scores
+      (when (and (if (stringp gnus-decay-scores)
+                    (string-match gnus-decay-scores file)
+                  gnus-decay-scores)
                 (or cached (file-exists-p file))
                 (or (not decay)
                     (gnus-decay-scores alist decay)))
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]