🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #266024

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

#266024
From: Sqwertz
Date: Thu, 11 May 2023 23:42
95 lines
4448 bytes
On Mon, 08 May 2023 16:36:58 -0400, Benjamin Esham wrote:

> Hi all,
> 
> I have a fairly large killfile. Frequently, Gnus fetches the news and shows
> me that there are groups with unread messages, but when I try to go into one
> of those groups, Gnus fetches more information and realizes that all of the
> unread articles have been scored down below the threshold of being visible.
> 
> This is a bit annoying. I'd like to get Gnus to apply my scores in each
> group as soon as it has fetched news.
> 
> This is my attempt to get that behavior:
> 
>     (defun enter-all-groups-to-force-scoring ()
>       (gnus-message 5 "Scoring...")
>       (catch 'done-looping
>         (let ((seen-newsgroups '())
>               (most-recent-newsgroup nil))
>           (while t
>             (gnus-group-select-group)
>             (setq most-recent-newsgroup gnus-newsgroup-name)
>             (gnus-summary-exit)
>             (if (seq-contains-p seen-newsgroups most-recent-newsgroup)
>               (throw 'done-looping nil)
>               (setq seen-newsgroups (cons most-recent-newsgroup
>                                           seen-newsgroups))))))
>       (gnus-message 5 "Scoring... done"))
>     
>     (add-hook 'gnus-group-prepare-hook
>               'enter-all-groups-to-force-scoring)
>     (add-hook 'gnus-after-getting-new-news-hook
>               'enter-all-groups-to-force-scoring)
>     
> This seems to work *sometimes*--I can watch as groups that had unread
> articles are reduced to zero unread articles. Other times, though, it seems
> that scores in a particular group were not applied, and I run into the
> sequence of events described at the top of this post.
> 
> (This solution also opens the last newsgroup twice, because I wasn't sure
> how else to determine that we're done looping through the groups!)
> 
> Is there a better way of accomplishing this bit of configuration?
> 
> Thanks,
> 
> Benjamin
> 
> (I also asked this question on the Emacs Stack Exchange site at
> <https://emacs.stackexchange.com/q/77110/24262>.)

I'm not a LISP guy, but are you by chance scoring on article
headers (or the article body) that are not available until the
whole article is retrieved?  

News servers only dish out a subset of article headers when
getting a list of articles for perusal and initial scoring(*).
Only when the entire article is retrieved for full viewing can it
be scored on "non-XOVER" headers (or the body text).

(*) To see the list of headers your news server provides
initially, telnet into your news server (usually at port 119, at
least) and give it a "list overview.fmt" command.

Doubtful you're on Windows 1[0-1], but if you are it would look
something like this: 

Microsoft Windows [Version 10.0.19044.2965]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Sqwertz>telnet usnews.blocknews.net 119
'telnet' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Sqwertz>pkgmgr /iu:"TelnetClient"

C:\Users\Sqwertz>telnet usnews.blocknews.net 119
'telnet' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Sqwertz>cmd.exe
'cmd.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Sqwertz>command.com
'command.com' is not recognized as an internal or external
command, operable program or batch file.

C:\Users\Sqwertz>fuck you
'fuck' is not recognized as an internal or external command,
operable program or batch file.

So it's a good thing you're not using Windows, eh?

-sw
Technical Details
Message-ID: <a6b506r3e02k.dlg@sqwertz.com>
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>

Show Full Headers
Complete Article Headers
Message-ID: <a6b506r3e02k.dlg@sqwertz.com>
Subject: Re: [Gnus] Applying scores to groups as soon as news is fetched
Date: Thu, 11 May 2023 18:42:23 -0500
From: Sqwertz <sqwertzme@gmail.compost>
References: <rucwqq.ngzfbd@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
User-Agent: 40tude_Dialog/2.0.15.84
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Organization: Me, Myself, and Inc.
Lines: 95
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Thu, 11 May 2023 23:42:22 UTC
X-Received-Bytes: 4350