From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 31639 invoked from network); 5 Mar 2022 03:03:07 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 5 Mar 2022 03:03:07 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nQKhD-00AcCW-Nb for ml@inbox.vuxu.org; Fri, 04 Mar 2022 21:03:03 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94.2) (envelope-from ) id 1nQKhC-005BDP-S4 for ml@inbox.vuxu.org; Fri, 04 Mar 2022 21:03:02 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1nQKhB-005BDI-9Z for ding@lists.math.uh.edu; Fri, 04 Mar 2022 21:03:01 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nQKh7-00H8Fx-HN for ding@lists.math.uh.edu; Fri, 04 Mar 2022 21:03:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Du3meu7WembhoN/eeJI3PA8n3Ov5WUp2K6JKeMKZb8g=; b=khfcYdcfAW4q7+vKRVFACofOHy bx2iljDUtTYyAXUrLkxQ+Z9GxpSq7evC6Frv157MkqTwqCjgtSWaWwZJ/ibwD2xNXkU5uiz2VhE2J Da9f3dFZdW4phy01THw3s5uAwTcOMqsAvjZ3fDjugd1LDUSZgH8aEqrbCOAUdblso4lg=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQKgy-00046w-J7 for ding@gnus.org; Sat, 05 Mar 2022 04:02:52 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nQKgw-0004XC-CF for ding@gnus.org; Sat, 05 Mar 2022 04:02:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Andrew Cohen Subject: Re: nnvirtual groups and article warping Date: Sat, 05 Mar 2022 11:02:34 +0800 Message-ID: <87mti5qeyd.fsf@ust.hk> References: <87czj3x9gh.fsf@ucl.ac.uk> <8735jyygh2.fsf@ericabrahamsen.net> <87czj27hm4.fsf@ust.hk> <87pmn11vbq.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:DU1cQxwvIUc6nXBGy7FkTdV5968= List-ID: Precedence: bulk >>>>> "EA" == Eric Abrahamsen writes: EA> Andrew Cohen writes: >>>>>>> "EA" == Eric Abrahamsen 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