Gnus development mailing list
 help / color / mirror / Atom feed
* Score articles that have been superseded
@ 2023-12-04 23:49 John Haman
  2023-12-05  1:35 ` Score articles that supersede older articles in nntp John Haman
  2023-12-06  7:12 ` Score articles that have been superseded yeti
  0 siblings, 2 replies; 19+ messages in thread
From: John Haman @ 2023-12-04 23:49 UTC (permalink / raw)
  To: ding

I would like to lower the score on nntp articles that superseded older articles. I thought of two ways to do this, but they don't seem to work. Here is one of the scoring rules that I tried. I added "Supercedes" to `gnus-extra-headers',

Then I tried the scoring rule:

(("extra"
  ("" -1000 nil s "Supersedes"))

(This is what I get from following the gnus prompts, I also tried

(("extra"
  ("Supercedes" -1000 nil s))

)

It does not seem to work.

Would appreciate your ideas.

-- 
Dr. John Haman
Maryland, USA


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Score articles that supersede older articles in nntp
  2023-12-04 23:49 Score articles that have been superseded John Haman
@ 2023-12-05  1:35 ` John Haman
  2023-12-05  3:03   ` Eric Abrahamsen
  2023-12-06  7:12 ` Score articles that have been superseded yeti
  1 sibling, 1 reply; 19+ messages in thread
From: John Haman @ 2023-12-05  1:35 UTC (permalink / raw)
  To: ding

I realized the subject didn't match the intent of the question, adjusted...


John Haman <mail@johnhaman.org> writes:

> I would like to lower the score on nntp articles that superseded older articles.
> I thought of two ways to do this, but they don't seem to work. Here is one of
> the scoring rules that I tried. I added "Supercedes" to `gnus-extra-headers',
>
> Then I tried the scoring rule:
>
> (("extra"
>   ("" -1000 nil s "Supersedes"))
>
> (This is what I get from following the gnus prompts, I also tried
>
> (("extra"
>   ("Supercedes" -1000 nil s))
>
> )
>
> It does not seem to work.
>
> Would appreciate your ideas.

-- 
Dr. John Haman
Maryland, USA


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05  1:35 ` Score articles that supersede older articles in nntp John Haman
@ 2023-12-05  3:03   ` Eric Abrahamsen
  2023-12-05  5:48     ` Adam Sjøgren
  2023-12-05 12:23     ` John Haman
  0 siblings, 2 replies; 19+ messages in thread
From: Eric Abrahamsen @ 2023-12-05  3:03 UTC (permalink / raw)
  To: ding

John Haman <mail@johnhaman.org> writes:

> I realized the subject didn't match the intent of the question, adjusted...
>
>
> John Haman <mail@johnhaman.org> writes:
>
>> I would like to lower the score on nntp articles that superseded older articles.
>> I thought of two ways to do this, but they don't seem to work. Here is one of
>> the scoring rules that I tried. I added "Supercedes" to `gnus-extra-headers',
>>
>> Then I tried the scoring rule:
>>
>> (("extra"
>>   ("" -1000 nil s "Supersedes"))
>>
>> (This is what I get from following the gnus prompts, I also tried
>>
>> (("extra"
>>   ("Supercedes" -1000 nil s))

This might be an artifact of posting here, but you've got "Supersedes"
in one place, and "Supercedes" in the other. Looks like the "c" is the
correct spelling, maybe confirm that first? (The manual even makes a
snarky comment about this...)



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05  3:03   ` Eric Abrahamsen
@ 2023-12-05  5:48     ` Adam Sjøgren
  2023-12-05 15:09       ` Eric Abrahamsen
  2023-12-05 12:23     ` John Haman
  1 sibling, 1 reply; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-05  5:48 UTC (permalink / raw)
  To: ding

Eric writes:

> Looks like the "c" is the correct spelling, maybe confirm that
> first? (The manual even makes a snarky comment about this...)

"Just remember, kids: There is no 'c' in 'supersede'."

So the 'c'-version is not the correct spelling ;-)


  Best regards,

    Adam, who feels slighly responsible for the need to filter on
          Supersedes:.

-- 
 "This whole business of Santa rewarding good kids          Adam Sjøgren
  and neglecting bad kids really bugs me."             asjo@koldfront.dk



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05  3:03   ` Eric Abrahamsen
  2023-12-05  5:48     ` Adam Sjøgren
@ 2023-12-05 12:23     ` John Haman
  2023-12-05 13:12       ` Adam Sjøgren
  1 sibling, 1 reply; 19+ messages in thread
From: John Haman @ 2023-12-05 12:23 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>
> This might be an artifact of posting here, but you've got "Supersedes"
> in one place, and "Supercedes" in the other. Looks like the "c" is the
> correct spelling, maybe confirm that first? (The manual even makes a
> snarky comment about this...)
>

Thanks!

Unfortunately the rule

(("extra"
  ("Supersedes" -1000 nil s)))

Does not work either.

-- 
Dr. John Haman
Maryland, USA


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05 12:23     ` John Haman
@ 2023-12-05 13:12       ` Adam Sjøgren
  2023-12-05 13:41         ` Adam Sjøgren
  0 siblings, 1 reply; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-05 13:12 UTC (permalink / raw)
  To: ding

John writes:

> (("extra"
>   ("Supersedes" -1000 nil s)))
>
> Does not work either.

Yeah, I had something like this in my ancient archives:

    (("extra" ("Yes, score=\[1-9\]\[0-9\]" -5000 nil r "X-Spam-Status")))

and then:

    (add-to-list 'gnus-extra-headers 'X-Spam-Status)

Which I tried to translate with "Supersedes" - but I don't think it
works, probably the extra field *must* be exposed by the nntp-server
in XOVER-replies for it to - maybe - work.


  Best regards,

    Adam

-- 
 "The problem is, you see everything in terms of            Adam Sjøgren
  black and white" "SOMETIMES THAT'S THE WAY THINGS    asjo@koldfront.dk
  ARE!!"



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05 13:12       ` Adam Sjøgren
@ 2023-12-05 13:41         ` Adam Sjøgren
  2023-12-06  0:46           ` John Haman
  0 siblings, 1 reply; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-05 13:41 UTC (permalink / raw)
  To: ding

Adam writes:

> I don't think it works, probably the extra field *must* be exposed
> by the nntp-server in XOVER-replies for it to - maybe - work.

I tried adding 'Supersedes' to "LIST OVERVIEW.FMT" and "XOVER" on
Feedbase, but I still can't make Gnus score on the header :-/


  Best regards,

    Adam

-- 
 "Please, either disclose the reason for dillon@'s          Adam Sjøgren
  commit bit removal with explanations or give it      asjo@koldfront.dk
  back to him or I will switch to linux."



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05  5:48     ` Adam Sjøgren
@ 2023-12-05 15:09       ` Eric Abrahamsen
  2023-12-05 15:16         ` Emanuel Berg
  0 siblings, 1 reply; 19+ messages in thread
From: Eric Abrahamsen @ 2023-12-05 15:09 UTC (permalink / raw)
  To: ding

Adam Sjøgren <asjo@koldfront.dk> writes:

> Eric writes:
>
>> Looks like the "c" is the correct spelling, maybe confirm that
>> first? (The manual even makes a snarky comment about this...)
>
> "Just remember, kids: There is no 'c' in 'supersede'."
>
> So the 'c'-version is not the correct spelling ;-)

Ha! Sometimes I'm amazed any of my code works at all...



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05 15:09       ` Eric Abrahamsen
@ 2023-12-05 15:16         ` Emanuel Berg
  0 siblings, 0 replies; 19+ messages in thread
From: Emanuel Berg @ 2023-12-05 15:16 UTC (permalink / raw)
  To: ding

Eric Abrahamsen wrote:

>>> Looks like the "c" is the correct spelling, maybe confirm
>>> that first? (The manual even makes a snarky comment about
>>> this...)
>>
>> "Just remember, kids: There is no 'c' in 'supersede'."
>>
>> So the 'c'-version is not the correct spelling ;-)
>
> Ha! Sometimes I'm amazed any of my code works at all...

I feeling every programmer knows :)

-- 
underground experts united
https://dataswamp.org/~incal



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-05 13:41         ` Adam Sjøgren
@ 2023-12-06  0:46           ` John Haman
  2023-12-06 16:55             ` Adam Sjøgren
  0 siblings, 1 reply; 19+ messages in thread
From: John Haman @ 2023-12-06  0:46 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

Adam Sjøgren <asjo@koldfront.dk> writes:

> Adam writes:
>
>> I don't think it works, probably the extra field *must* be exposed
>> by the nntp-server in XOVER-replies for it to - maybe - work.
>
> I tried adding 'Supersedes' to "LIST OVERVIEW.FMT" and "XOVER" on
> Feedbase, but I still can't make Gnus score on the header :-/
>
>
>   Best regards,
>
>     Adam

Thanks Adam, good snooping. Any other attempts to detect supersedes?

I tried to use `1-` to check if an article has a parent, but it didn't work either.

-- 
Dr. John Haman
Maryland, USA


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that have been superseded
  2023-12-04 23:49 Score articles that have been superseded John Haman
  2023-12-05  1:35 ` Score articles that supersede older articles in nntp John Haman
@ 2023-12-06  7:12 ` yeti
  1 sibling, 0 replies; 19+ messages in thread
From: yeti @ 2023-12-06  7:12 UTC (permalink / raw)
  To: ding

I couldn't get it done via gnus-extra-headers, but scanning all headers
for "^Supersedes: " seems to work.

------------------------------------------------------------------------
(("head"
 ("^Supersedes: " 4711 nil r)))
------------------------------------------------------------------------

=>

------------------------------------------------------------------------
O  20230417T092214 [yeti           ][ 4711] playing with GNUS
OA 20230421T142311 [yeti           ][    0] > ţęşţ
O  20230429T135320 [yeti           ][    0] +-> 
OA 20230429T135713 [yeti           ][ 4711] \-> 
O  20230429T140909 [yeti           ][    0]   \-> 
------------------------------------------------------------------------

But it scans slooooooow...

-- 
I do not bite, I just want to play.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-06  0:46           ` John Haman
@ 2023-12-06 16:55             ` Adam Sjøgren
  2023-12-06 17:15               ` yeti
  0 siblings, 1 reply; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-06 16:55 UTC (permalink / raw)
  To: ding

John writes:

> Adam Sjøgren <asjo@koldfront.dk> writes:

>> I tried adding 'Supersedes' to "LIST OVERVIEW.FMT" and "XOVER" on
>> Feedbase, but I still can't make Gnus score on the header :-/

> Thanks Adam, good snooping. Any other attempts to detect supersedes?

I tried using edebug-defun on one of the score functions, and it
looked like it was looking at Xref when scoring on Supersedes!?!

I didn't understand where it went off the rails, but it seemed like
either a Gnus bug or gnus-extra-headers doesn't do what I think it
does.


  Best regards,

    Adam

-- 
 "Thanks to enzymes, humans are solar-powered."             Adam Sjøgren
                                                       asjo@koldfront.dk



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-06 16:55             ` Adam Sjøgren
@ 2023-12-06 17:15               ` yeti
  2023-12-07  2:53                 ` John Haman
  2023-12-08 22:17                 ` Adam Sjøgren
  0 siblings, 2 replies; 19+ messages in thread
From: yeti @ 2023-12-06 17:15 UTC (permalink / raw)
  To: ding

I couldn't get it done via gnus-extra-headers, but scanning all headers
for "^Supersedes: " seems to work.

------------------------------------------------------------------------
(("head"
 ("^Supersedes: " 4711 nil r)))
------------------------------------------------------------------------

=>

------------------------------------------------------------------------
O  20230417T092214 [yeti           ][ 4711] playing with GNUS
OA 20230421T142311 [yeti           ][    0] > ţęşţ
O  20230429T135320 [yeti           ][    0] +-> 
OA 20230429T135713 [yeti           ][ 4711] \-> 
O  20230429T140909 [yeti           ][    0]   \-> 
------------------------------------------------------------------------

But it scans slooooooow...

-- 
1. Hitchhiker 25: (76) "How long?" he said.  (77) "Seven and a half
million years," said Deep Thought.  (78) Lunkwill and Fook blinked at
each other.  (79) "Seven and a half million years ...!" they cried in
chorus.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-06 17:15               ` yeti
@ 2023-12-07  2:53                 ` John Haman
  2023-12-08 22:17                 ` Adam Sjøgren
  1 sibling, 0 replies; 19+ messages in thread
From: John Haman @ 2023-12-07  2:53 UTC (permalink / raw)
  To: yeti; +Cc: ding

Thanks. This was actually my original attempt, but indeed, the overhead from scanning all headers makes the method impractical . 


—
Dr. John Haman
Sent from my iPhone

> On Dec 6, 2023, at 1:29 PM, yeti <yeti@tilde.institute> wrote:
> 
> I couldn't get it done via gnus-extra-headers, but scanning all headers
> for "^Supersedes: " seems to work.
> 
> ------------------------------------------------------------------------
> (("head"
> ("^Supersedes: " 4711 nil r)))
> ------------------------------------------------------------------------
> 
> =>
> 
> ------------------------------------------------------------------------
> O  20230417T092214 [yeti           ][ 4711] playing with GNUS
> OA 20230421T142311 [yeti           ][    0] > ţęşţ
> O  20230429T135320 [yeti           ][    0] +->
> OA 20230429T135713 [yeti           ][ 4711] \->
> O  20230429T140909 [yeti           ][    0]   \->
> ------------------------------------------------------------------------
> 
> But it scans slooooooow...
> 
> --
> 1. Hitchhiker 25: (76) "How long?" he said.  (77) "Seven and a half
> million years," said Deep Thought.  (78) Lunkwill and Fook blinked at
> each other.  (79) "Seven and a half million years ...!" they cried in
> chorus.
> 
> 



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-06 17:15               ` yeti
  2023-12-07  2:53                 ` John Haman
@ 2023-12-08 22:17                 ` Adam Sjøgren
  2023-12-08 23:12                   ` Adam Sjøgren
  1 sibling, 1 reply; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-08 22:17 UTC (permalink / raw)
  To: ding

Hm, apparently gnus-extra-headers is just for mail groups:

,----[ https://www.gnu.org/software/emacs/manual/html_node/gnus/Scoring-On-Other-Headers.html ]
| Now, there’s not much you can do about the slowness for news groups,
| but for mail groups, you have greater control. In To From Newsgroups,
| it’s explained in greater detail what this mechanism does, but here’s
| a cookbook example for nnml on how to allow scoring on the ‘To’ and
| ‘Cc’ headers.
| 
| Put the following in your ~/.gnus.el file.
| 
| (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
|       nnmail-extra-headers gnus-extra-headers)
| 
| Restart Gnus and rebuild your nnml overview files with the M-x
| nnml-generate-nov-databases command. This will take a long time if you
| have much mail.
| 
| Now you can score on ‘To’ and ‘Cc’ as “extra headers” like so: I e s p
| To RET <your name> RET.
| 
| See? Simple. 
`----

Also, Gnus doesn't send LIST OVERVIEW.FMT, so it has no idea what any
extra fields in XOVER replies are, so I don't see how it _can_ take
advantage of those, even if they are there.

Hm?!


  Best regards,

    Adam

-- 
 "Hvad fa'en?! Det er s'guda ikke Prince. Hvad skal         Adam Sjøgren
  vi med 34 millioner Grøn Look? Der er s'guda ingen   asjo@koldfront.dk
  der ryger Menthol!"



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-08 22:17                 ` Adam Sjøgren
@ 2023-12-08 23:12                   ` Adam Sjøgren
  2023-12-09  1:41                     ` John Haman
  2023-12-09 19:00                     ` John Haman
  0 siblings, 2 replies; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-08 23:12 UTC (permalink / raw)
  To: ding

Tracing through this, it seems the lines returned from XOVER gets
parsed by nnheader-parse-nov which uses a macro
nnheader-nov-parse-extra which just returns nil, even though LIST
OVERVIEW.FMT specified an extra field after Xref, and even though
XOVER sent that field.

Not quite sure what kind of surgery is needed to improve this.

Oh, wait, it expects the extra fields to be prefixed with the header
name, like Xref: is?

Let me try that.

YES, that was it!

John: try this score rule on news.feedbase.org now:

  (("extra" ("." -1000 nil r "Supersedes")))

WORKSFORME.


  Best regards,

    Adam

-- 
 "The code is more what you'd call 'guidelines',            Adam Sjøgren
  than actual rules."                                  asjo@koldfront.dk



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-08 23:12                   ` Adam Sjøgren
@ 2023-12-09  1:41                     ` John Haman
  2023-12-09 19:00                     ` John Haman
  1 sibling, 0 replies; 19+ messages in thread
From: John Haman @ 2023-12-09  1:41 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

Adam Sjøgren <asjo@koldfront.dk> writes:

> John: try this score rule on news.feedbase.org now:
>
>   (("extra" ("." -1000 nil r "Supersedes")))
>

Message received. Will test and report back.

-- 
Dr. John Haman
Maryland, USA


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-08 23:12                   ` Adam Sjøgren
  2023-12-09  1:41                     ` John Haman
@ 2023-12-09 19:00                     ` John Haman
  2023-12-09 21:12                       ` Adam Sjøgren
  1 sibling, 1 reply; 19+ messages in thread
From: John Haman @ 2023-12-09 19:00 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: ding

Adam Sjøgren <asjo@koldfront.dk> writes:

> John: try this score rule on news.feedbase.org now:
>
>   (("extra" ("." -1000 nil r "Supersedes")))
>

Adam -- This works. Thanks for all your help!

-John

-- 
Dr. John Haman
Maryland, USA


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Score articles that supersede older articles in nntp
  2023-12-09 19:00                     ` John Haman
@ 2023-12-09 21:12                       ` Adam Sjøgren
  0 siblings, 0 replies; 19+ messages in thread
From: Adam Sjøgren @ 2023-12-09 21:12 UTC (permalink / raw)
  To: ding

John writes:

> Adam Sjøgren <asjo@koldfront.dk> writes:
>
>> John: try this score rule on news.feedbase.org now:
>>
>>   (("extra" ("." -1000 nil r "Supersedes")))
>>
>
> Adam -- This works. Thanks for all your help!

Great! I learned something new about XOVER in NNTP :-)


  /A

-- 
 "Are you William Blake?"                                   Adam Sjøgren
 "Yes, do you know my poetry?"                         asjo@koldfront.dk



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-12-09 21:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 23:49 Score articles that have been superseded John Haman
2023-12-05  1:35 ` Score articles that supersede older articles in nntp John Haman
2023-12-05  3:03   ` Eric Abrahamsen
2023-12-05  5:48     ` Adam Sjøgren
2023-12-05 15:09       ` Eric Abrahamsen
2023-12-05 15:16         ` Emanuel Berg
2023-12-05 12:23     ` John Haman
2023-12-05 13:12       ` Adam Sjøgren
2023-12-05 13:41         ` Adam Sjøgren
2023-12-06  0:46           ` John Haman
2023-12-06 16:55             ` Adam Sjøgren
2023-12-06 17:15               ` yeti
2023-12-07  2:53                 ` John Haman
2023-12-08 22:17                 ` Adam Sjøgren
2023-12-08 23:12                   ` Adam Sjøgren
2023-12-09  1:41                     ` John Haman
2023-12-09 19:00                     ` John Haman
2023-12-09 21:12                       ` Adam Sjøgren
2023-12-06  7:12 ` Score articles that have been superseded yeti

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).