* Does scoring on `Date' still work?
@ 1998-03-08 13:11 Mike McEwan
1998-03-13 21:10 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Mike McEwan @ 1998-03-08 13:11 UTC (permalink / raw)
Hi,
I've been trying, unsuccessfully, to score on the `date' header of an
article. However, try as I might, I cannot seem to get the match type
of `before' (or any of the others for that matter) working the way I want.
I'm attempting to lower the score of all articles older than a
certain number of days in an agent category.
Anyone successfully using these `Date' match types?
--
Mike.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Does scoring on `Date' still work?
1998-03-08 13:11 Does scoring on `Date' still work? Mike McEwan
@ 1998-03-13 21:10 ` Lars Magne Ingebrigtsen
1998-03-14 14:15 ` Mike McEwan
0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-13 21:10 UTC (permalink / raw)
Mike McEwan <mike@lotusland.demon.co.uk> writes:
> I've been trying, unsuccessfully, to score on the `date' header of an
> article. However, try as I might, I cannot seem to get the match type
> of `before' (or any of the others for that matter) working the way I want.
It should work OK, but I haven't actually tested it. What's the score
rule you're trying to use?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Does scoring on `Date' still work?
1998-03-13 21:10 ` Lars Magne Ingebrigtsen
@ 1998-03-14 14:15 ` Mike McEwan
1998-03-19 12:34 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Mike McEwan @ 1998-03-14 14:15 UTC (permalink / raw)
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> It should work OK, but I haven't actually tested it. What's the score
> rule you're trying to use?
Example `(("date"
("Tue, 10 Mar 1998 12:38:35 GMT" -1000 729462 before)))'
Shouldn't this mark all articles with a `date' header containing a
date *before* this down by 1000?
Or have I got the wrong end of the stick here? A `V R' or `q'ing out
of the summary buffer and re-entering does not make any difference.
--
Mike.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Does scoring on `Date' still work?
1998-03-14 14:15 ` Mike McEwan
@ 1998-03-19 12:34 ` Lars Magne Ingebrigtsen
1998-03-21 19:20 ` Mike McEwan
0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-03-19 12:34 UTC (permalink / raw)
Mike McEwan <mike@lotusland.demon.co.uk> writes:
> Example `(("date"
> ("Tue, 10 Mar 1998 12:38:35 GMT" -1000 729462 before)))'
>
> Shouldn't this mark all articles with a `date' header containing a
> date *before* this down by 1000?
Uhm... Or is it the other way around? I never can remember...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Does scoring on `Date' still work?
1998-03-19 12:34 ` Lars Magne Ingebrigtsen
@ 1998-03-21 19:20 ` Mike McEwan
0 siblings, 0 replies; 5+ messages in thread
From: Mike McEwan @ 1998-03-21 19:20 UTC (permalink / raw)
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Uhm... Or is it the other way around? I never can remember...
Well I did a bit of digging...
With the help of edebug, I noticed that the function used to convert
date strings to YYYYMMDDTHHMMSS in gnus-score.el was
`gnus-date-iso8601'. However, this function should be passed the
entire header of an article, but was only actually being passed a date
string.
The following patch against gnus 5.6.3 sorts the problem for me. I
also changed the the user entered match type of `a' to equate with
`after' and `n' to `at' (`now' was receiving `Illegal match type').
I can't figure out how to get a score `permanence' of `immediate' to
work though - any ideas?
--
Mike.
--- gnus-5.6.3/lisp/gnus-score.el-5.6.3 Sun Feb 22 03:19:05 1998
+++ gnus-5.6.3/lisp/gnus-score.el Sat Mar 21 17:52:58 1998
@@ -330,7 +330,7 @@
f: fuzzy string
r: regexp string
b: before date
- a: at date
+ a: after date
n: this date
<: less than number
>: greater than number
@@ -343,7 +343,7 @@
(const :tag "fuzzy string" f)
(const :tag "regexp string" r)
(const :tag "before date" b)
- (const :tag "at date" a)
+ (const :tag "after date" a)
(const :tag "this date" n)
(const :tag "less than number" <)
(const :tag "greater than number" >)
@@ -509,8 +509,8 @@
(?z s "substring" body-string)
(?p r "regexp string" body-string)
(?b before "before date" date)
- (?a at "at date" date)
- (?n now "this date" date)
+ (?a after "after date" date)
+ (?n at "this date" date)
(?< < "less than number" number)
(?> > "greater than number" number)
(?= = "equal to number" number)))
@@ -1586,13 +1586,13 @@
(cond
((eq type 'after)
(setq match-func 'string<
- match (gnus-date-iso8601 (nth 0 kill))))
+ match (gnus-time-iso8601 (gnus-date-get-time (nth 0 kill)))))
((eq type 'before)
(setq match-func 'gnus-string>
- match (gnus-date-iso8601 (nth 0 kill))))
+ match (gnus-time-iso8601 (gnus-date-get-time (nth 0 kill)))))
((eq type 'at)
(setq match-func 'string=
- match (gnus-date-iso8601 (nth 0 kill))))
+ match (gnus-time-iso8601 (gnus-date-get-time (nth 0 kill)))))
((eq type 'regexp)
(setq match-func 'string-match
match (nth 0 kill)))
@@ -1605,7 +1605,7 @@
(while (setq article (pop articles))
(when (and
(setq l (aref (car article) gnus-score-index))
- (funcall match-func match (gnus-date-iso8601 l)))
+ (funcall match-func match (gnus-time-iso8601 (gnus-date-get-time l))))
(when trace
(push (cons (car-safe (rassq alist gnus-score-cache)) kill)
gnus-score-trace))
--- gnus-5.6.3/texi/gnus.texi-5.6.3 Sat Mar 21 18:57:30 1998
+++ gnus-5.6.3/texi/gnus.texi Sat Mar 21 19:01:09 1998
@@ -11911,7 +11911,7 @@
Before date.
@item a
-At date.
+After date.
@item n
This date.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-03-21 19:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-08 13:11 Does scoring on `Date' still work? Mike McEwan
1998-03-13 21:10 ` Lars Magne Ingebrigtsen
1998-03-14 14:15 ` Mike McEwan
1998-03-19 12:34 ` Lars Magne Ingebrigtsen
1998-03-21 19:20 ` Mike McEwan
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).