🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #266039

Re: [Gnus] Applying scores to groups as soon as news is fetched

#266039
From: issdr
Date: Wed, 17 May 2023 09:04
52 lines
2974 bytes
Benjamin Esham wrote:

> issdr wrote:

[...]

>     (add-hook 'gnus-started-hook 'gnus-batch-score)
>     (add-hook 'gnus-after-getting-new-news-hook 'gnus-batch-score)
>
> but that didn't seem to work: there was a very long delay after I started
> Gnus--maybe as long as a minute--but still not all of my scores had been
> applied.

those vars are labeled as risky in local files. second one generated an
endless loop, as `gnus-batch-score' does get new news itself.

> I went into the Gnus source and extracted the "main part" of that function,
> which is
>
>     (let (info group newsrc unread)
>       (setq newsrc (cdr gnus-newsrc-alist))
>       (while (setq info (pop newsrc))
>         (setq group (gnus-info-group info)
>               unread (gnus-group-unread group))
>         (when (and (<= (gnus-info-level info) gnus-level-subscribed)
>                    (and unread
>                         (or (eq unread t)
>                             (not (zerop unread)))))
>           (ignore-errors
>             (gnus-summary-read-group group nil t nil t))
>           (when (eq (current-buffer) (get-buffer gnus-summary-buffer))
>             (gnus-summary-exit)))))
>
> and found that if I ran this interactively (at the M-: prompt) after news
> had been fetched, then the scores would really, truly be applied.

good. define a new function with it, then *add* it to the
after-getting-new-news hook (you were replacing it, and it's non empty
by default), like

(eval-after-load "gnus-start"
  '(add-to-list 'gnus-after-getting-new-news-hook 'ben-gnus-score t))

[...]

>> <nntp://news.eternal-september.org/gnu.emacs.gnus>.
>
> I'm pretty sure I've posted in that group before, and yet Gnus is
> telling me that it doesn't exist on the server. But that will be a
> separate thing to debug...

i believe i have an account there, i'll check when i reach my pc
Technical Details
Message-ID: <87h6sbl45q.fsf@ID-313311.news.uni-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <rucwqq.ngzfbd@bdesham.net> <87bkiuvzhu.fsf@ID-313311.news.uni-berlin.de> <rurn21.lz09lt@bdesham.net>

Show Full Headers
Complete Article Headers
Message-ID: <87h6sbl45q.fsf@ID-313311.news.uni-berlin.de>
Subject: Re: [Gnus] Applying scores to groups as soon as news is fetched
Date: Wed, 17 May 2023 11:04:49 +0200
From: issdr <p_u_n_k_i_n_d@yahoo.it>
References: <rucwqq.ngzfbd@bdesham.net> <87bkiuvzhu.fsf@ID-313311.news.uni-berlin.de> <rurn21.lz09lt@bdesham.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.readers
Lines: 52
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net KmoJ5P8gCXRSf8NmSz+NTQX97/uF86SEKopClrV0GeEji7om1n
X-Orig-Path: ID-313311.news.uni-berlin.de!not-for-mail
Cancel-Lock: sha1:E5VxYaFB9b+kuR+89Ye/o/FA6gM=
User-Agent: Gnus/5.13 Emacs/30.0.50 (gnu/linux)
X-Face: Zw,R[}.rn5!7_4>.U1j!zNkszle\GP]4G+xPe`%F=i$PMP)8W/c57#P6B_TFI@1-LR6?a9 T@A$^Vh,|cG:_4p59{<cR\^_^r9<1Iq/8?4,7|-PhJpEyE/v42omF=F]M<p?9+;~(nPqwCCm*IaHu N4S.pGVU=E!6R=0!PVz1`vb&zc`.X<jw