From: Andrew Cohen <acohen@ust.hk>
To: ding@gnus.org
Subject: Re: nnvirtual groups and article warping
Date: Sat, 05 Mar 2022 11:02:34 +0800 [thread overview]
Message-ID: <87mti5qeyd.fsf@ust.hk> (raw)
In-Reply-To: <87pmn11vbq.fsf@ericabrahamsen.net>
>>>>> "EA" == Eric Abrahamsen <eric@ericabrahamsen.net> writes:
EA> Andrew Cohen <acohen@ust.hk> writes:
>>>>>>> "EA" == Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
EA> Eric Abrahamsen writes
>>
>> [...]
>>
[...]
EA> I agree that there's less and less need for nnvirtual, but also
EA> that there's no harm in adding an `nnvirtual-warp-to-article'
EA> deffoo, for completeness' sake.
Totally agree.
EA> I was going to bring this up again, regarding full nnvirtual
EA> feature coverage for nnselect: Eric F's original query was about
EA> using nnselect exactly as nnvirtual is used: you add the
EA> component groups, put in *no* specification about which articles
EA> to display, and then when you enter the select group it simply
EA> shows you all articles from the component groups.
Err, if you mean this literally, then its just the function I have
posted several times before. Here it is again:
#+begin_src emacs-lisp
(defun my-test-virtual (groups)
"Combine GROUPS into a virtual group.
The nnvirtual backend has a complicated algorithm to interleave
the articles from the component groups. This function just
concatenates them."
(let ((rsv 1)
list)
(dolist (group groups)
(pcase-let ((`(,min . ,max) (gnus-active group)))
(push (list group (cons rsv (cons min max))) list)))
list))
#+end_src
This will do what you say: entering the group will show you all the
unread articles from all the component groups. Or if you ask for ALL the
articles, it will show you all of them. If you ask for some subset
(e.g. with a prefix arg or setting a limit) it will show you that
too---just not evenly divided among the component groups. (In some
previous versions that I posted I set a limit argument, which ensured
that you always retrieved at least this many articles from each group.)
But you know this :) The issue is always how we decide to mix articles
from the different groups.
EA> (I've never looked closely at the nnvirtual code and I don't
EA> know how it decides which articles to draw from which component
EA> groups. If none of the groups have unread articles, and you
EA> request 100 articles from the virtual group, how does it handle
EA> sorting and limiting?)
It uses a complicated algorithm to achieve what it describes as "fair
mixing" among the component groups. I have never had the patience to try
to understand it. And it seemed odd anyway---if one of the component
groups has had no new messages for years it would still be mixed in
equally. And it also favored groups with larger numbers of postings (I
think---my memory is fuzzy).
EA> Anyway, I spent twenty minutes or so trying to come up with a
EA> nnselect-spec that would do this, and failed. If you could point
EA> out how we'd go about this, then I think we could say nnselect
EA> has a full superset of nnvirtual functionality.
Well, try the one above :) But you won't be totally happy.
I think I finally figured out how we can implement it---we can use the
RSV! (I know, ironic that in our last email exchange I was advocating
removing it :))
The issue is that, for lots of reasons, nnselect always collects
articles by group; so its a pain to interleave articles. But we should be
able to do this rather easily using the RSV---we just have an algorithm
to assign RSVs based on something (maybe date? but really we could use
any algorithm we like) and then sort first by RSV, and secondly by group
(which I think is what nnselect does now anyway). I'll try to find a few
minutes to test this. In the meantime, Eric F. can continue to use the
existing nnvirtual backend:)
Best,
Andy
--
Andrew Cohen
next prev parent reply other threads:[~2022-03-05 3:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 16:54 Eric S Fraga
2022-03-03 19:38 ` Eric Abrahamsen
2022-03-03 23:15 ` Andrew Cohen
2022-03-04 17:28 ` Eric Abrahamsen
2022-03-05 3:02 ` Andrew Cohen [this message]
2022-03-05 6:49 ` Andrew Cohen
2022-03-06 12:49 ` Eric S Fraga
2022-03-06 13:04 ` Andrew Cohen
2022-03-07 15:35 ` Eric S Fraga
2022-03-07 23:07 ` Andrew Cohen
2022-03-08 8:59 ` Eric S Fraga
2022-03-06 13:11 ` Andrew Cohen
2022-03-04 8:01 ` Eric S Fraga
2022-03-04 15:45 ` Eric Abrahamsen
2022-03-04 15:56 ` Eric S Fraga
2022-03-04 17:16 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mti5qeyd.fsf@ust.hk \
--to=acohen@ust.hk \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).