GNU bug report logs - #74905
[PATCH] Implement search for nnvirtual Gnus groups

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Björn Bidar <bjorn.bidar@HIDDEN>; Keywords: patch; dated Sun, 15 Dec 2024 23:59:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 22 Dec 2024 20:48:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 15:48:17 2024
Received: from localhost ([127.0.0.1]:52122 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPSs4-0000Ya-OD
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 15:48:17 -0500
Received: from thaodan.de ([185.216.177.71]:55414)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bjorn.bidar@HIDDEN>) id 1tPSs1-0000YH-Iq
 for 74905 <at> debbugs.gnu.org; Sun, 22 Dec 2024 15:48:15 -0500
Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49])
 by thaodan.de (Postfix) with ESMTPSA id DEEB9D0005B;
 Sun, 22 Dec 2024 22:48:06 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail;
 t=1734900487; bh=KF9aqtGbVrcO/9qfHOYxIAa6xqWUQca4Mw+X1lpY/Gg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=ObINmp/LPBkv0Hsmjf3ghPmmqDY5AYATHx+pUoYF5K3VZnNBzyZi/XxK8TKbNyAuZ
 LUm25n6hgpxZaYif7zxMoIHhEW29bqvk13PGBr0xeXD71OHTWkXn7Mjsvu8V7Lmxlk
 TjAkiSd+DfJjzO7n/Y2zrhfUXovpFcYMAUm9P1iE7G4Kzps/ztkt/n31vFeseboU6g
 AM3zfSmQA2mKcT2IoP0YjuHB1EozuPICOTa2dHs9MvvdmP505ivm3C0+LiGOMDZcIU
 iMIpzlighaGIRxPcwyxGqDdFLgkGZdcoJ9/cBdZS2OYZhIyYsyV7Fn04mZr8sNjlsJ
 TH8ozSdlN0oxHP9heuoLLMuXY8/lq/xBZYjmeA9TM/VehHu47n8MdLhxOkdLdGeN9C
 xXh9cg8NbvhcgKgCwK8MthPRhrBF7eb7ZehpN+Tff/jVPBOfk8cRvWk1sn+Twluyz/
 1uZHxRt7rZtToZreqDELOzxxa68fbO4ljYz/vDbVgPgkckhNK/b++Q2n3j+KbZz0TX
 k5G5bqe8yBQm50OyMEkm934Cc4w2p58S5Y3RYo0r/LDhaJOXM+irN2kTqlnbjHdoin
 JR/q6xhxVCGi9LHiLK5P5+/T7hKLXe4QlMLI8nxoBiE7qqWAt8b49BdVNDvGEKAQpC
 lZW6Um13ishLQguBNNpvIMd4=
From: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
To: James Thomas <jimjoe@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <86pllkj6d8.fsf@HIDDEN> (James Thomas's message of "Sun, 22 Dec
 2024 17:07:39 +0530")
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
 <86pllozkq4.fsf@HIDDEN> <86ldwcziff.fsf@HIDDEN>
 <87y10c1p21.fsf@HIDDEN> <86v7ve9658.fsf@HIDDEN>
 <86pllkj6d8.fsf@HIDDEN>
Autocrypt: addr=bjorn.bidar@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq
 w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV
 CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl
 HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8
 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF
 CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h
 K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2
 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC
 HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN
 XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg
 gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1+ntAhsDBQsJCAcCAiICBhUKCQgL
 AgQWAgMBAh4HAheAAAoJEFwbdKFlHF9oBgwA/iQHwe0VL4Df4GGTYlNjMSHFlIkBmN4UfYGLYj3E
 TrOUAQC51M+M3cjsL8WHdpBz6VAo6df9d+rVwhQ9vQuFHqevArg4BGTX6T4SCisGAQQBl1UBBQEB
 B0Cbohc3JEfn005/cm0AOGjSsW1ZxAkgaoVNjbpqk4MgNAMBCAeIeAQYFgoAIBYhBFHxdut1RzAe
 pymoq1wbdKFlHF9oBQJk1+k+AhsMAAoJEFwbdKFlHF9ooHABAKGmrGBic/Vys3BBrOQiRB3Z7izO
 HwhqTRpAqFZtXS2nAQDZhp/5aYw1TZjTzkm1KVt9QiYnjd/MvxRE9iaY6x4mDbgzBGTX6T4WCSsG
 AQQB2kcPAQEHQAgRJq/tMcCCB2XyA5WZpu7GvpRx0m9IPRWazeqhOq7uiO8EGBYKACAWIQRR8Xbr
 dUcwHqcpqKtcG3ShZRxfaAUCZNf71AIbIgCBCRBcG3ShZRxfaHYgBBkWCgAdFiEEUfF263VHMB6n
 KairXBt0oWUcX2gFAmTX+9QACgkQXBt0oWUcX2jeSwD6AtWn0cuo8IF35YRo4o3cDRJnUfJnbvJy
 GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK
 S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA==
Date: Sun, 22 Dec 2024 22:48:05 +0200
Message-ID: <87ldw75tru.fsf@>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  James Thomas <jimjoe@HIDDEN> writes: > Björn Bidar wrote:
    > >> James Thomas <jimjoe@HIDDEN> writes: >> >>> Björn Bidar wrote: >>>
    >>>> James Thomas <jimjoe@HIDDEN> writes: >>>> >>>>> James Thomas wrote:
    >>>>> >>>>>> Björn Bidar wrot [...] 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                         [185.216.177.71 listed in sa-trusted.bondedsender.org]
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                            [185.216.177.71 listed in bl.score.senderscore.com]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.2 INVALID_MSGID          Message-Id is not valid, according to RFC 2822
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

James Thomas <jimjoe@HIDDEN> writes:

> Bj=C3=B6rn Bidar wrote:
>
>> James Thomas <jimjoe@HIDDEN> writes:
>>
>>> Bj=C3=B6rn Bidar wrote:
>>>
>>>> James Thomas <jimjoe@HIDDEN> writes:
>>>>
>>>>> James Thomas wrote:
>>>>>
>>>>>> Bj=C3=B6rn Bidar wrote:
>>>>>>
>>>>>>> James Thomas <jimjoe@HIDDEN> writes:
>>>>>>>
>>>>>>>> Bj=C3=B6rn Bidar wrote:
>>>>>>>>
>>>>>>>>> This patch implements search for nnvirtual. I'm using
>>>>>>>>> publi-inbox's
>>>>>>>>> with nnvirtual to group each group into one.
>>>>>>>>> However searching wasn't possible in these nnvirtual groups.
>>>>>>>>> I implemented gnus-search-run-search based on the existing
>>>>>>>>> nnselect gnus-search-run-search function.
>>>>>>>>
>>>>>>>> Thanks! I haven't looked into it, but here are some quick comments:
>>>>>>>>
>>>>>>>>> I'm looking for feedback on the patch. I don't exactly know how
>>>>>>>>> the search function is called when multiple groups of the same
>>>>>>>>> type
>>>>>>>>> are
>>>>>>>>> involved. For nnvirtual each group is its on server, does that
>>>>>>>>> mean
>>>>>>>>> the
>>>>>>>>> function will be always called only for each group? In that case
>>>>>>>>> everything should be good.
>>>>>>>>
>>>>>>>> That seems to be the case: see
>>>>>>>> gnus-group-read-ephemeral-search-group
>>>>>>>> and gnus-group-make-search-group.
>>>>>>>
>>>>>>> OK good than my understanding from my tests matched with the rest of
>>>>>>> the
>>>>>>> code.
>>>>>>> Thanks for these examples I haven't looked at the create group
>>>>>>> functions
>>>>>>> as the searched methods don't have to create groups even when they
>>>>>>> start
>>>>>>> a new search by another backend just like e.g. if the user would
>>>>>>> call
>>>>>>> a
>>>>>>> search on another imap group.
>>>>>>>
>>>>>>>>> +(deffoo nnvirtual-request-list (&optional server)
>>>>>>>>> +  (when (nnvirtual-possibly-change-server server)
>>>>>>>>> +    (with-current-buffer nntp-server-buffer
>>>>>>>>> +      (erase-buffer)
>>>>>>>>> +      (dolist (group nnvirtual-component-groups)
>>>>>>>>> +        (insert (format "%S 0  1 y\n" group))))
>>>>>>>>> +    t))
>>>>>>>>
>>>>>>>> Did you check if gnus-start.el#L1801 withstands this? It seems to
>>>>>>>> me
>>>>>>>> to
>>>>>>>> assume that nnvirtual doesn't have -request-list.
>>>>>>>
>>>>>>> It does. If the user has falsely add nnvirtual to one of the select
>>>>>>> methods than it will call it try to call the function which doesn't
>>>>>>> fail
>>>>>>> or do anything. The only thing that happens from that is it will
>>>>>>> show
>>>>>>> the false results as groups contained in the nnvirtual method
>>>>>>> without
>>>>>>> a
>>>>>>> parameter.
>>>>>>
>>>>>> No, I mean, the point of that code seems to be that nnvirtual is
>>>>>> activated _last_, i.e. after any component groups of other backends.
>>>>>
>>>>> No, sorry, I was a little confused about this. But it seems to me that
>>>>> -request-group removes each group from the component list (unlike your
>>>>> -request-list). Is that relevant? IDK. The latter seems to do info
>>>>> updation as well, based on -always-rescan.
>>>>>
>>>>
>>>> Request list supposed to list the available groups on the server it is
>>>> also for example used in gnus-search-imap class gnus-search-run-search
>>>> function. Since for the case of nnvirtual all groups on the server
>>>> are all groups contained in the group it is the right function.
>>>
>>> True, but since it returns the group data like -request-group and often
>>> acts as a _substitute_, shouldn't it mimic its operation? If not, is
>>> there a good reason?
>>
>> It does mimic it's operation or doesn't it?
>
> I mean, I was asking if it _should_ or not. I think it would be a good
> idea to get some 'grep'ed evidence of code coverage that -request-list
> would not supplant the intentions of -request-group.

To verify my earlier thoughts and have an example I tested this.

-request-group functions are for retrieving the metedata of the group
and possibly update the existing metata against the new one.

-request-list function list all groups on the server with possibly
the status of group e.g. killed, zombie or none if subscribed, the
highest amount of articles and the group name.

The latter is the one we need.

>>>> I took all the explenation for each functions purpose from the manual
>>>> section linked below:
>>>> (info "(gnus) Required Back End Functions")
>>>
>>> Please do look at how they're called, as well; for a fuller picture.
>>>
>>>> To me the code just reads like that that for nnvirtual
>>>> the groups are activated this way only because
>>>> it doesn't have request list.
>>>>
>>>>>
>>>>> No, I mean, the point of that code seems to be that nnvirtual is
>>>>> activated _last_, i.e. after any component groups of other backends. =
And
>>>>> it's not just select methods: even Foreign Groups are included, no?
>>>>>
>>>>>> Should verify that nnvirtual has arguments? So far it is possible
>>>>>> to add nnvirtual to select methods with "" but this is invalid.
>>>>>
>>>>> I'm not sure what you mean, but it does have arguments: the components
>>>>> regexp, for one.
>>>>>
>>>>
>>>> It does have arguments exactly but you can add nnvirtual without
>>>> arguments or technically an empty argument to select methods.
>>>>
>>>>>> If nnvirtual isn't added to select methods nothing happens besides
>>>>>> the regular activation.
>>>>>
>>>>> Couldn't someone have added one? Say, with the above argument?
>>>>
>>>> I guess so but that isn't the intended way of using nnvirtual,
>>>> also it wouldn't take care of the request of the setup such
>>>> as creating the associated group.
>>>
>>> Well now you've made me look at it... :-)
>>>
>>> Try this:
>>>
>>> - In *Groups*: j nnvirtual:Test RET
>>> - S l 3 RET
>>> - e "nnvirtual:Test" C-c C-c
>>> - q
>>> - Add to -secondary-select-methods:
>>>
>>>   (nnvirtual "Test"
>>> 		   (nnvirtual-component-regexp
>>>                    ;; Put in some group you have.
>>> 		   "^$\\|\\(^nnml\\+archive:sent$\\)"))
>>>
>>> M-x gnus
>>>
>>>> Regular activation meant in this context that the request-list function
>>>> is called but without a argument the nnvirtual-server doesn't contain
>>>> any groups.
>>>
>>> OK. But I don't think I've come across that term.
>>>
>>> Also, your -request-list makes the component groups subscribable from
>>> the Server buffer. That seems wrong too: the backend ought to have only
>>> one (umbrella) group, no?
>
>> It only has one group containing other groups yes. The backend is not
>> supposed to end up in the Server but is only there if it falsely was
>> added to the select-methods.
>>
>> Anyway I need a backtrace from the case where the search did not work
>> with nnml groups.
>
> No no, you misunderstand me: It was just to demonstrate that:
>
>> that isn't the intended way of using nnvirtual
>
> ...can't be said. So please re-verify anything (there might've been)
> about the patch predicated on that. I did not encounter errors.
>
> I know you're exploiting the fact that the server and group are one, but
> perhaps it's being too clever by half. Any such unintended effects of
> that easy road ought to be acceptable to other users.

Yeah that's why I posted the patch here so more can try it with
different setups.

A review from a Gnus maintainer or contributor would also be awesome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 22 Dec 2024 11:39:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 06:39:43 2024
Received: from localhost ([127.0.0.1]:49186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPKJC-0007AH-58
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 06:39:43 -0500
Received: from mout.gmx.net ([212.227.17.21]:33881)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jimjoe@HIDDEN>) id 1tPKJ3-00079Q-9N
 for 74905 <at> debbugs.gnu.org; Sun, 22 Dec 2024 06:39:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1734867567; x=1735472367; i=jimjoe@HIDDEN;
 bh=AdNeGBd7OQKLNhANTiXxCs+dGgFo6Yh1n3a3xBiDkaE=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:Date:Message-ID:
 References:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=Ffi/hQ7hThiIXq25mG2nR0Awhka8CwUFshhsgELK1bFqD+5GXJ+DABIehXPQu+82
 jDYWL5seU1Qx0IqSgTcmtKl+GiXm/rm6LygCnacoH7mY/wM0eU7xqM8YNUr9kSxQ5
 xb7f8+WzUefW/Vn7VSX/dzC5n9+QQ0oF6uJpTmWQJTTAIyJTQqo/v0WD5lr7A0XmQ
 heDms4Q//Srt+BTRcLGxf9mP4xVmJTplW4aEY2hvi7PVOBZR2gAEXgroFzhfSIxih
 S7jB71kZVHIuQauqBoD464pfa8CM3aeFIM93SOON997BUykNIa0Cqjt6XLejTCK58
 QtafYUlyvuyiNKugMg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from user-Inspiron-3493 ([42.104.188.46]) by mail.gmx.net (mrgmx105
 [212.227.17.174]) with ESMTPSA (Nemesis) id 1McY8T-1tzD1914Qv-00bb8p; Sun, 22
 Dec 2024 12:39:27 +0100
From: James Thomas <jimjoe@HIDDEN>
To: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <87y10alqe5.fsf@> (=?utf-8?Q?=22Bj=C3=B6rn?= Bidar"'s message
 of "Fri, 20 Dec 2024 10:17:38 +0200")
Date: Sun, 22 Dec 2024 17:07:39 +0530
Message-ID: <86pllkj6d8.fsf@HIDDEN>
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
 <86pllozkq4.fsf@HIDDEN> <86ldwcziff.fsf@HIDDEN>
 <87y10c1p21.fsf@HIDDEN> <86v7ve9658.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:TPrI7ERlMrzc3Ye9MtI9Y3QUWp1ZJg8wvRhKIIpGUkX4m1d42RH
 B/9R7bRb971VH3zhetjSG5i7DprupFQ9cGwEUGIrqgyuQf2oth5FnRajEeU0JocSNgyzCcp
 jxIKwSLiNj59w4itSCUNWYM8Jcr7k1JaYtfgSVo6oooQ6pOLb+4IP74VFOf9K7yVdKNV6LJ
 NqfTsJQZVpwoKD6dgsl7A==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:o6uZATBlXtQ=;CS3dRPugm9RDqGnaWJEsc7P0smc
 v4+7vO+/Nr4XgpMZADPqfmMYN42gb9DK7rqd/9W7bYo7YsOTKRYQnCpD3Dy4YmhAH2LUKif5k
 YJheL4sz2/kVUOOhUTWhBcx+ttrKfhLSerqX3GdAlj6IouaCZIjPAU51WFBdjXjdEqhsZSdmU
 8DXXS7xcLAAOUaWtpS9OtPem3jlX3Wr7bSYWahcP3s1uVh8oI2b3cvCPB1rtoMAcEeT77CJOx
 d2IYyuQzvFmPczdsEr4R3WhDRSauV3gja9flEltZ9KHqmD5bgpBMZnkorgyayGlxl+m/9l3Be
 jdznP3+e6OMLy7wqfQ711ZbjWIl9yD5+6JeOgPPCl1KpQ5L0Vq03MgQK+30abnS6aJschOgBa
 MgbZAjVr4I+zxn5jVyMIDDanR9YOHXd1v7a9A+DvSytCCaVhs6feY9PaEXcHVXmR/Aw/xl92D
 Tz/dhTRxgP7G5hQDNJa95GhmcoG3fZkfCcPxxmK4TPBUX4e/2qUo39aOTK+IRbLM9bKwCaUb6
 rUOkUSw6BmuBoUGMv9n+NHSyIw62MaWOCSNFqxPK/dUx7iyu4g9fEXO4rhgXMaoZj4Axv+GVp
 DKiyQPm9hwjB7eBNNPRyFbQZBdiC/UsOhvBtuHXpHUNKI+6kX6P/Ts1Z9+7TeAbn3hXrb33cn
 7IUXkwrEdSayTKy6WVqtBaQHV2m2Hcy2K965a35vPyducPECS9dY+RC6Rp62NX3r3SeBVEvFI
 v6+8QSW7V2uZLoAS3LqkrKIK9gzX3IjZ5MN/EtQ7+YbFpU7RJA3znl5fC5nSd39pilk6QFJUQ
 9zAF6FaSUtcaooaUjRk8J2iwvhMIUFOy5QEQtxplige2tiHVMSqF0Zos5AV+xQ76fi90xz0oK
 tOoeJwRxl9DMhv5Bi0Pur19aswXUF4VG2FD0/VzyguH+cWzVXFs++61MwzFF9YELe3LhBRX1a
 1qbJKr1dVILJNEopGBWx9RqciTBuIgWJsLIg0xO2kfadQTVEHKYWdTmcQZbwNUr5Z5zDq/KSp
 PCg/YKtNW1TRGBMgetpybAGj9+60tq6rwEdUHfaKs65mC5ZN4FY/zhP/gB3Lu+5PB8XXFlORh
 XtWUTJHdUtkcCY1JJITL2n0KcDf0eS
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Bj=C3=B6rn Bidar wrote:

> James Thomas <jimjoe@HIDDEN> writes:
>
>> Bj=C3=B6rn Bidar wrote:
>>
>>> James Thomas <jimjoe@HIDDEN> writes:
>>>
>>>> James Thomas wrote:
>>>>
>>>>> Bj=C3=B6rn Bidar wrote:
>>>>>
>>>>>> James Thomas <jimjoe@HIDDEN> writes:
>>>>>>
>>>>>>> Bj=C3=B6rn Bidar wrote:
>>>>>>>
>>>>>>>> This patch implements search for nnvirtual. I'm using
>>>>>>>> publi-inbox's
>>>>>>>> with nnvirtual to group each group into one.
>>>>>>>> However searching wasn't possible in these nnvirtual groups.
>>>>>>>> I implemented gnus-search-run-search based on the existing
>>>>>>>> nnselect gnus-search-run-search function.
>>>>>>>
>>>>>>> Thanks! I haven't looked into it, but here are some quick comments:
>>>>>>>
>>>>>>>> I'm looking for feedback on the patch. I don't exactly know how
>>>>>>>> the search function is called when multiple groups of the same
>>>>>>>> type
>>>>>>>> are
>>>>>>>> involved. For nnvirtual each group is its on server, does that
>>>>>>>> mean
>>>>>>>> the
>>>>>>>> function will be always called only for each group? In that case
>>>>>>>> everything should be good.
>>>>>>>
>>>>>>> That seems to be the case: see
>>>>>>> gnus-group-read-ephemeral-search-group
>>>>>>> and gnus-group-make-search-group.
>>>>>>
>>>>>> OK good than my understanding from my tests matched with the rest of
>>>>>> the
>>>>>> code.
>>>>>> Thanks for these examples I haven't looked at the create group
>>>>>> functions
>>>>>> as the searched methods don't have to create groups even when they
>>>>>> start
>>>>>> a new search by another backend just like e.g. if the user would
>>>>>> call
>>>>>> a
>>>>>> search on another imap group.
>>>>>>
>>>>>>>> +(deffoo nnvirtual-request-list (&optional server)
>>>>>>>> +  (when (nnvirtual-possibly-change-server server)
>>>>>>>> +    (with-current-buffer nntp-server-buffer
>>>>>>>> +      (erase-buffer)
>>>>>>>> +      (dolist (group nnvirtual-component-groups)
>>>>>>>> +        (insert (format "%S 0  1 y\n" group))))
>>>>>>>> +    t))
>>>>>>>
>>>>>>> Did you check if gnus-start.el#L1801 withstands this? It seems to
>>>>>>> me
>>>>>>> to
>>>>>>> assume that nnvirtual doesn't have -request-list.
>>>>>>
>>>>>> It does. If the user has falsely add nnvirtual to one of the select
>>>>>> methods than it will call it try to call the function which doesn't
>>>>>> fail
>>>>>> or do anything. The only thing that happens from that is it will
>>>>>> show
>>>>>> the false results as groups contained in the nnvirtual method
>>>>>> without
>>>>>> a
>>>>>> parameter.
>>>>>
>>>>> No, I mean, the point of that code seems to be that nnvirtual is
>>>>> activated _last_, i.e. after any component groups of other backends.
>>>>
>>>> No, sorry, I was a little confused about this. But it seems to me that
>>>> -request-group removes each group from the component list (unlike your
>>>> -request-list). Is that relevant? IDK. The latter seems to do info
>>>> updation as well, based on -always-rescan.
>>>>
>>>
>>> Request list supposed to list the available groups on the server it is
>>> also for example used in gnus-search-imap class gnus-search-run-search
>>> function. Since for the case of nnvirtual all groups on the server
>>> are all groups contained in the group it is the right function.
>>
>> True, but since it returns the group data like -request-group and often
>> acts as a _substitute_, shouldn't it mimic its operation? If not, is
>> there a good reason?
>
> It does mimic it's operation or doesn't it?

I mean, I was asking if it _should_ or not. I think it would be a good
idea to get some 'grep'ed evidence of code coverage that -request-list
would not supplant the intentions of -request-group.

>>> I took all the explenation for each functions purpose from the manual
>>> section linked below:
>>> (info "(gnus) Required Back End Functions")
>>
>> Please do look at how they're called, as well; for a fuller picture.
>>
>>> To me the code just reads like that that for nnvirtual
>>> the groups are activated this way only because
>>> it doesn't have request list.
>>>
>>>>
>>>> No, I mean, the point of that code seems to be that nnvirtual is
>>>> activated _last_, i.e. after any component groups of other backends. A=
nd
>>>> it's not just select methods: even Foreign Groups are included, no?
>>>>
>>>>> Should verify that nnvirtual has arguments? So far it is possible
>>>>> to add nnvirtual to select methods with "" but this is invalid.
>>>>
>>>> I'm not sure what you mean, but it does have arguments: the components
>>>> regexp, for one.
>>>>
>>>
>>> It does have arguments exactly but you can add nnvirtual without
>>> arguments or technically an empty argument to select methods.
>>>
>>>>> If nnvirtual isn't added to select methods nothing happens besides
>>>>> the regular activation.
>>>>
>>>> Couldn't someone have added one? Say, with the above argument?
>>>
>>> I guess so but that isn't the intended way of using nnvirtual,
>>> also it wouldn't take care of the request of the setup such
>>> as creating the associated group.
>>
>> Well now you've made me look at it... :-)
>>
>> Try this:
>>
>> - In *Groups*: j nnvirtual:Test RET
>> - S l 3 RET
>> - e "nnvirtual:Test" C-c C-c
>> - q
>> - Add to -secondary-select-methods:
>>
>>   (nnvirtual "Test"
>> 		   (nnvirtual-component-regexp
>>                    ;; Put in some group you have.
>> 		   "^$\\|\\(^nnml\\+archive:sent$\\)"))
>>
>> M-x gnus
>>
>>> Regular activation meant in this context that the request-list function
>>> is called but without a argument the nnvirtual-server doesn't contain
>>> any groups.
>>
>> OK. But I don't think I've come across that term.
>>
>> Also, your -request-list makes the component groups subscribable from
>> the Server buffer. That seems wrong too: the backend ought to have only
>> one (umbrella) group, no?

> It only has one group containing other groups yes. The backend is not
> supposed to end up in the Server but is only there if it falsely was
> added to the select-methods.
>
> Anyway I need a backtrace from the case where the search did not work
> with nnml groups.

No no, you misunderstand me: It was just to demonstrate that:

> that isn't the intended way of using nnvirtual

...can't be said. So please re-verify anything (there might've been)
about the patch predicated on that. I did not encounter errors.

I know you're exploiting the fact that the server and group are one, but
perhaps it's being too clever by half. Any such unintended effects of
that easy road ought to be acceptable to other users.

I don't have any other misgivings, personally (on the face of it, i.e.:
I haven't tested it well).

--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 20 Dec 2024 08:18:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 20 03:18:19 2024
Received: from localhost ([127.0.0.1]:41553 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tOYDC-0002cZ-W9
	for submit <at> debbugs.gnu.org; Fri, 20 Dec 2024 03:18:19 -0500
Received: from thaodan.de ([185.216.177.71]:34638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bjorn.bidar@HIDDEN>) id 1tOYDA-0002cH-2n
 for 74905 <at> debbugs.gnu.org; Fri, 20 Dec 2024 03:18:17 -0500
Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49])
 by thaodan.de (Postfix) with ESMTPSA id 20C0AD00072;
 Fri, 20 Dec 2024 10:17:39 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail;
 t=1734682659; bh=SWmV6mo4/p9/0HaObmYbffJ/9tOvTadNDd2TQ8k5Bcs=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=o0SNKmNquBWF3R6JBhrtt/aaMWWjwnAX2hlVf61RrmAfwq8h+cE7N1J00PCpbFpMs
 nPCMVW8WTTYNmxXwjeBnpztu7jxEcZVEqqc3v2O5ervoYaPanvbHqJH1joy9KghBH9
 Qx1xpGsUsmg8lpTyZ+4IK7ZdSAlLh6e2uvyUnp7v6F6siRKADUmeBUDN9eEg4fZpDu
 ClNwPNVdQJsiXJt7oCcmALUegYJk0rLwmIXdvxEz2/Of5nKM2CuKSPQkQKHbaGo8sQ
 RaLCxhzZ3J/4vCxuCHdBGEh9SoySz4XrVApW5RCAO+UjQrroigtkawHy5uR6EQkBLR
 77k/DNt9Ad5OZNiY7gNiyvIr2J5m5Q4f20j5coY8Jws2uu/RdRUQVPXCy645xnRcrc
 /dMTvDJitIG/sAf5o9LcG6DYNVu73HYeasQG4zK4N47HIYMEkJNW9FLYWMJ7Z7mxVH
 Baih4S/Q9hBKdKaVtMwv+wCmkr4ab8ygTGqvOjZHmmQWhQWXq2tUNltVUeprCdoRIL
 OS57803hw2KBbABHbjKLFcp2u2eBod3JrewjD/1VDV8ekB1VEje6IaUqfxo9o6JQrg
 gxeXf5jHNgE5NO+QHozqvFPUnQHqsVHc1+BNwixZK+S7AGpV0cVxdFaB/+i+l+ivn5
 cpzLbj+GTflXP0DmUAknFZQg=
From: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
To: James Thomas <jimjoe@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <86v7ve9658.fsf@HIDDEN> (James Thomas's message of "Fri, 20 Dec
 2024 12:45:47 +0530")
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
 <86pllozkq4.fsf@HIDDEN> <86ldwcziff.fsf@HIDDEN>
 <87y10c1p21.fsf@HIDDEN> <86v7ve9658.fsf@HIDDEN>
Autocrypt: addr=bjorn.bidar@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq
 w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV
 CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl
 HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8
 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF
 CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h
 K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2
 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC
 HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN
 XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg
 gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1+ntAhsDBQsJCAcCAiICBhUKCQgL
 AgQWAgMBAh4HAheAAAoJEFwbdKFlHF9oBgwA/iQHwe0VL4Df4GGTYlNjMSHFlIkBmN4UfYGLYj3E
 TrOUAQC51M+M3cjsL8WHdpBz6VAo6df9d+rVwhQ9vQuFHqevArg4BGTX6T4SCisGAQQBl1UBBQEB
 B0Cbohc3JEfn005/cm0AOGjSsW1ZxAkgaoVNjbpqk4MgNAMBCAeIeAQYFgoAIBYhBFHxdut1RzAe
 pymoq1wbdKFlHF9oBQJk1+k+AhsMAAoJEFwbdKFlHF9ooHABAKGmrGBic/Vys3BBrOQiRB3Z7izO
 HwhqTRpAqFZtXS2nAQDZhp/5aYw1TZjTzkm1KVt9QiYnjd/MvxRE9iaY6x4mDbgzBGTX6T4WCSsG
 AQQB2kcPAQEHQAgRJq/tMcCCB2XyA5WZpu7GvpRx0m9IPRWazeqhOq7uiO8EGBYKACAWIQRR8Xbr
 dUcwHqcpqKtcG3ShZRxfaAUCZNf71AIbIgCBCRBcG3ShZRxfaHYgBBkWCgAdFiEEUfF263VHMB6n
 KairXBt0oWUcX2gFAmTX+9QACgkQXBt0oWUcX2jeSwD6AtWn0cuo8IF35YRo4o3cDRJnUfJnbvJy
 GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK
 S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA==
Date: Fri, 20 Dec 2024 10:17:38 +0200
Message-ID: <87y10alqe5.fsf@>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  James Thomas <jimjoe@HIDDEN> writes: > Björn Bidar wrote:
    > >> James Thomas <jimjoe@HIDDEN> writes: >> >>> James Thomas wrote: >>>
    >>>> Björn Bidar wrote: >>>> >>>>> James Thomas <jimjoe@HIDDEN> writes:
    >>>>> >>>>>> Björn Bidar wrot [...] 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [185.216.177.71 listed in sa-accredit.habeas.com]
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                            [185.216.177.71 listed in bl.score.senderscore.com]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.2 INVALID_MSGID          Message-Id is not valid, according to RFC 2822
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

James Thomas <jimjoe@HIDDEN> writes:

> Bj=C3=B6rn Bidar wrote:
>
>> James Thomas <jimjoe@HIDDEN> writes:
>>
>>> James Thomas wrote:
>>>
>>>> Bj=C3=B6rn Bidar wrote:
>>>>
>>>>> James Thomas <jimjoe@HIDDEN> writes:
>>>>>
>>>>>> Bj=C3=B6rn Bidar wrote:
>>>>>>
>>>>>>> This patch implements search for nnvirtual. I'm using
>>>>>>> publi-inbox's
>>>>>>> with nnvirtual to group each group into one.
>>>>>>> However searching wasn't possible in these nnvirtual groups.
>>>>>>> I implemented gnus-search-run-search based on the existing
>>>>>>> nnselect gnus-search-run-search function.
>>>>>>
>>>>>> Thanks! I haven't looked into it, but here are some quick comments:
>>>>>>
>>>>>>> I'm looking for feedback on the patch. I don't exactly know how
>>>>>>> the search function is called when multiple groups of the same
>>>>>>> type
>>>>>>> are
>>>>>>> involved. For nnvirtual each group is its on server, does that
>>>>>>> mean
>>>>>>> the
>>>>>>> function will be always called only for each group? In that case
>>>>>>> everything should be good.
>>>>>>
>>>>>> That seems to be the case: see
>>>>>> gnus-group-read-ephemeral-search-group
>>>>>> and gnus-group-make-search-group.
>>>>>
>>>>> OK good than my understanding from my tests matched with the rest of
>>>>> the
>>>>> code.
>>>>> Thanks for these examples I haven't looked at the create group
>>>>> functions
>>>>> as the searched methods don't have to create groups even when they
>>>>> start
>>>>> a new search by another backend just like e.g. if the user would
>>>>> call
>>>>> a
>>>>> search on another imap group.
>>>>>
>>>>>>> +(deffoo nnvirtual-request-list (&optional server)
>>>>>>> +  (when (nnvirtual-possibly-change-server server)
>>>>>>> +    (with-current-buffer nntp-server-buffer
>>>>>>> +      (erase-buffer)
>>>>>>> +      (dolist (group nnvirtual-component-groups)
>>>>>>> +        (insert (format "%S 0  1 y\n" group))))
>>>>>>> +    t))
>>>>>>
>>>>>> Did you check if gnus-start.el#L1801 withstands this? It seems to
>>>>>> me
>>>>>> to
>>>>>> assume that nnvirtual doesn't have -request-list.
>>>>>
>>>>> It does. If the user has falsely add nnvirtual to one of the select
>>>>> methods than it will call it try to call the function which doesn't
>>>>> fail
>>>>> or do anything. The only thing that happens from that is it will
>>>>> show
>>>>> the false results as groups contained in the nnvirtual method
>>>>> without
>>>>> a
>>>>> parameter.
>>>>
>>>> No, I mean, the point of that code seems to be that nnvirtual is
>>>> activated _last_, i.e. after any component groups of other backends.
>>>
>>> No, sorry, I was a little confused about this. But it seems to me that
>>> -request-group removes each group from the component list (unlike your
>>> -request-list). Is that relevant? IDK. The latter seems to do info
>>> updation as well, based on -always-rescan.
>>>
>>
>> Request list supposed to list the available groups on the server it is
>> also for example used in gnus-search-imap class gnus-search-run-search
>> function. Since for the case of nnvirtual all groups on the server
>> are all groups contained in the group it is the right function.
>
> True, but since it returns the group data like -request-group and often
> acts as a _substitute_, shouldn't it mimic its operation? If not, is
> there a good reason?

It does mimic it's operation or doesn't it?

>> I took all the explenation for each functions purpose from the manual
>> section linked below:
>> (info "(gnus) Required Back End Functions")
>
> Please do look at how they're called, as well; for a fuller picture.
>
>> To me the code just reads like that that for nnvirtual
>> the groups are activated this way only because
>> it doesn't have request list.
>>
>>>
>>> No, I mean, the point of that code seems to be that nnvirtual is
>>> activated _last_, i.e. after any component groups of other backends. And
>>> it's not just select methods: even Foreign Groups are included, no?
>>>
>>>> Should verify that nnvirtual has arguments? So far it is possible
>>>> to add nnvirtual to select methods with "" but this is invalid.
>>>
>>> I'm not sure what you mean, but it does have arguments: the components
>>> regexp, for one.
>>>
>>
>> It does have arguments exactly but you can add nnvirtual without
>> arguments or technically an empty argument to select methods.
>>
>>>> If nnvirtual isn't added to select methods nothing happens besides
>>>> the regular activation.
>>>
>>> Couldn't someone have added one? Say, with the above argument?
>>
>> I guess so but that isn't the intended way of using nnvirtual,
>> also it wouldn't take care of the request of the setup such
>> as creating the associated group.
>
> Well now you've made me look at it... :-)
>
> Try this:
>
> - In *Groups*: j nnvirtual:Test RET
> - S l 3 RET
> - e "nnvirtual:Test" C-c C-c
> - q
> - Add to -secondary-select-methods:
>
>   (nnvirtual "Test"
> 		   (nnvirtual-component-regexp
>                    ;; Put in some group you have.
> 		   "^$\\|\\(^nnml\\+archive:sent$\\)"))
>
> M-x gnus
>
>> Regular activation meant in this context that the request-list function
>> is called but without a argument the nnvirtual-server doesn't contain
>> any groups.
>
> OK. But I don't think I've come across that term.
>
> Also, your -request-list makes the component groups subscribable from
> the Server buffer. That seems wrong too: the backend ought to have only
> one (umbrella) group, no?

It only has one group containing other groups yes. The backend is not
supposed to end up in the Server but is only there if it falsely was
added to the select-methods.

Anyway I need a backtrace from the case where the search did not work
with nnml groups.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 20 Dec 2024 07:16:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 20 02:16:09 2024
Received: from localhost ([127.0.0.1]:41425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tOXF3-00086d-8Y
	for submit <at> debbugs.gnu.org; Fri, 20 Dec 2024 02:16:09 -0500
Received: from mout.gmx.net ([212.227.17.22]:43887)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jimjoe@HIDDEN>) id 1tOXEx-000864-LA
 for 74905 <at> debbugs.gnu.org; Fri, 20 Dec 2024 02:16:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1734678956; x=1735283756; i=jimjoe@HIDDEN;
 bh=fvYp9uFDfB3UxJcx8roWTixGJ1qTd2lfGN3XMGzcF5U=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=T9vgUqQcl7i9vkb5ga9NoPsOLwj7M0m3cwrqcpS/xTukxGbVntgWxHY7h6vJXAKg
 I1UnmC1TAWSmcg48k87KeTUMAahkBaggoP3khWd/dTx/XC/NxMp3Xtg10qW/E5yDt
 qJz8Kb7NiyB8kM51NdRn4tjYks9TcuOE/e4R0erVrPNzCfw5F7Dg6n7e/6Dyst5Ui
 hPhBfj8jB2zholkJm9ghO3XvU6jY3ZJ7wvi6HeXqfXq0wNr3wPBwa+I/qsDskVEZD
 sBTX1EvxEF4YvH+nQ+1XkrI6aXE4i768TirfTsscPSxGU36UQpnDIyvrbZ0/Q4ZEo
 Z6R2lyNTS3WohYGU4w==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from user-Inspiron-3493 ([42.108.30.49]) by mail.gmx.net (mrgmx104
 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MhD2Y-1u2nwP482M-00hNoh; Fri, 20
 Dec 2024 08:15:56 +0100
From: James Thomas <jimjoe@HIDDEN>
To: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <87y10c1p21.fsf@HIDDEN> (=?utf-8?Q?=22Bj=C3=B6rn?= Bidar"'s
 message of "Thu, 19 Dec 2024 02:42:14 +0200")
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
 <86pllozkq4.fsf@HIDDEN> <86ldwcziff.fsf@HIDDEN>
 <87y10c1p21.fsf@HIDDEN>
Date: Fri, 20 Dec 2024 12:45:47 +0530
Message-ID: <86v7ve9658.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:5QuU2xCUL+GzEbU5c3bPktIt3WULILYSOt93DsdQVEoYRRugLlU
 1z1kJCy4oMPG8E6Sqvg5SagLdZiM9Br+fYNDA9qDC+JztxvFzB9wYD+2wO7+LlJclLC0wyu
 IeinPdC4B0EFTkMiMyeciBzeqCUQDp78jLDP2Dqo/S4cVkiHST/CXan1abd0964zsDioHaR
 O7RuF0EStgZrCMeXkbUGg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:3O+hpBgenYQ=;klFLGGzoJAp1jQF5DwJ+vjxNotR
 ru+8KrtIogxCgk+ktXUeeTnyZzmUjUp8GuVgyqkdhlimd/MqaDMb0DDQNy8FAwo6AGY7ZKRmh
 pJ08x6F8r0vo/uT9UUisr1XquZv5x+7gpBcSpf75EkIWpKUxVoa7qudyal2ic21ypuuY2crdX
 xIsxAycwOrtuh9HAWuRdy4HsmJl/pPwtpoGSK5sN1l6gef8CjlfbisSTFWorzEnE2qyUHrxGp
 GfdPBJs5Mi8yfz1dByeQe0Uw4u2S0ddIdC7JwTCRQRrejLHEY/MyMQVg1Bv3htnVJwn7PLIXu
 TvPeO2PPNX9NNMgPnUI0xpPFbCeee4dbYL3CcY7OnUr7+NiNsfQLkDka+0tlU7r2BIcHaAnOh
 xiJ88oBuc9MmLhYCzC9S1B8fb0cEiXeplrAgxlhyLYiS41M80gUY7nZXpyOMVssm9mgzYFWmJ
 aV1H4yZ6e6Ckmr7jRcX2Qh70lqyehVhMl2LwVTOZks30a/n2fQGaCOOXPweBqGHS/sa+0FAog
 udE7vsg0ovPDYCiWcBuo0nxDwVZJNtqTA16/E+p4wAMpcP5ublVcUvc5tkC3rBr1/KhSJPOAR
 eGXH8Si7LDlGIzAeGuR+vYT44sq+5m+Z2ehARJw6o+uiVCuSbLY+jUOi0H4NvdSt67WmJvXt6
 lZMSjoX8PyE8xFh65FZ8OclWc5+Sz4ykpFy/NRoBWWWgnAnPjy6fAQvRv4DxSKFXqKvitolps
 bWk1EUdcPpm4I5uzjPN2w8g6Yxm2hfmzE3iF3Cr19Er2WGDNrkiCXrrUk1SFJ4Her/Ru5KYlc
 n7GE4Ua++5iguimlFDAdBCirw3FXVQEf9Cg2CWM8Cvb+1SxrxXF6DTXM5OJtiIikdUq7RJxEZ
 h04N5wAtdh2pTlRpZcksfJ+AglqhDv5kWgdkyxMHUA2dFB+6Pr3YVBzbFe6l0ED15WKtGNmit
 7iaoKMNBB/mXPqfrFJpLr+89sCyUTlsuDQndRJ0LDej+dp6lYsFTGMny7fkhjZQDQ8RW+Mm4S
 P0mSNH01H+HzngGLy8R2XajQX16Vn5XayBde68mYjI+wPOaE5VDwP5wn5pN4tK1rj51xrQN91
 Shc/4XsJsF9Q3nj2cGCYosg66YPEqZ
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Bj=C3=B6rn Bidar wrote:

> James Thomas <jimjoe@HIDDEN> writes:
>
>> James Thomas wrote:
>>
>>> Bj=C3=B6rn Bidar wrote:
>>>
>>>> James Thomas <jimjoe@HIDDEN> writes:
>>>>
>>>>> Bj=C3=B6rn Bidar wrote:
>>>>>
>>>>>> This patch implements search for nnvirtual. I'm using
>>>>>> publi-inbox's
>>>>>> with nnvirtual to group each group into one.
>>>>>> However searching wasn't possible in these nnvirtual groups.
>>>>>> I implemented gnus-search-run-search based on the existing
>>>>>> nnselect gnus-search-run-search function.
>>>>>
>>>>> Thanks! I haven't looked into it, but here are some quick comments:
>>>>>
>>>>>> I'm looking for feedback on the patch. I don't exactly know how
>>>>>> the search function is called when multiple groups of the same
>>>>>> type
>>>>>> are
>>>>>> involved. For nnvirtual each group is its on server, does that
>>>>>> mean
>>>>>> the
>>>>>> function will be always called only for each group? In that case
>>>>>> everything should be good.
>>>>>
>>>>> That seems to be the case: see
>>>>> gnus-group-read-ephemeral-search-group
>>>>> and gnus-group-make-search-group.
>>>>
>>>> OK good than my understanding from my tests matched with the rest of
>>>> the
>>>> code.
>>>> Thanks for these examples I haven't looked at the create group
>>>> functions
>>>> as the searched methods don't have to create groups even when they
>>>> start
>>>> a new search by another backend just like e.g. if the user would
>>>> call
>>>> a
>>>> search on another imap group.
>>>>
>>>>>> +(deffoo nnvirtual-request-list (&optional server)
>>>>>> +  (when (nnvirtual-possibly-change-server server)
>>>>>> +    (with-current-buffer nntp-server-buffer
>>>>>> +      (erase-buffer)
>>>>>> +      (dolist (group nnvirtual-component-groups)
>>>>>> +        (insert (format "%S 0  1 y\n" group))))
>>>>>> +    t))
>>>>>
>>>>> Did you check if gnus-start.el#L1801 withstands this? It seems to
>>>>> me
>>>>> to
>>>>> assume that nnvirtual doesn't have -request-list.
>>>>
>>>> It does. If the user has falsely add nnvirtual to one of the select
>>>> methods than it will call it try to call the function which doesn't
>>>> fail
>>>> or do anything. The only thing that happens from that is it will
>>>> show
>>>> the false results as groups contained in the nnvirtual method
>>>> without
>>>> a
>>>> parameter.
>>>
>>> No, I mean, the point of that code seems to be that nnvirtual is
>>> activated _last_, i.e. after any component groups of other backends.
>>
>> No, sorry, I was a little confused about this. But it seems to me that
>> -request-group removes each group from the component list (unlike your
>> -request-list). Is that relevant? IDK. The latter seems to do info
>> updation as well, based on -always-rescan.
>>
>
> Request list supposed to list the available groups on the server it is
> also for example used in gnus-search-imap class gnus-search-run-search
> function. Since for the case of nnvirtual all groups on the server
> are all groups contained in the group it is the right function.

True, but since it returns the group data like -request-group and often
acts as a _substitute_, shouldn't it mimic its operation? If not, is
there a good reason?

> I took all the explenation for each functions purpose from the manual
> section linked below:
> (info "(gnus) Required Back End Functions")

Please do look at how they're called, as well; for a fuller picture.

> To me the code just reads like that that for nnvirtual
> the groups are activated this way only because
> it doesn't have request list.
>
>>
>> No, I mean, the point of that code seems to be that nnvirtual is
>> activated _last_, i.e. after any component groups of other backends. And
>> it's not just select methods: even Foreign Groups are included, no?
>>
>>> Should verify that nnvirtual has arguments? So far it is possible
>>> to add nnvirtual to select methods with "" but this is invalid.
>>
>> I'm not sure what you mean, but it does have arguments: the components
>> regexp, for one.
>>
>
> It does have arguments exactly but you can add nnvirtual without
> arguments or technically an empty argument to select methods.
>
>>> If nnvirtual isn't added to select methods nothing happens besides
>>> the regular activation.
>>
>> Couldn't someone have added one? Say, with the above argument?
>
> I guess so but that isn't the intended way of using nnvirtual,
> also it wouldn't take care of the request of the setup such
> as creating the associated group.

Well now you've made me look at it... :-)

Try this:

- In *Groups*: j nnvirtual:Test RET
- S l 3 RET
- e "nnvirtual:Test" C-c C-c
- q
- Add to -secondary-select-methods:

  (nnvirtual "Test"
		   (nnvirtual-component-regexp
                   ;; Put in some group you have.
		   "^$\\|\\(^nnml\\+archive:sent$\\)"))
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
M-x gnus

> Regular activation meant in this context that the request-list function
> is called but without a argument the nnvirtual-server doesn't contain
> any groups.

OK. But I don't think I've come across that term.

Also, your -request-list makes the component groups subscribable from
the Server buffer. That seems wrong too: the backend ought to have only
one (umbrella) group, no?

--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 19 Dec 2024 00:42:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 19:42:55 2024
Received: from localhost ([127.0.0.1]:36577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO4cw-0003DM-Gc
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 19:42:54 -0500
Received: from thaodan.de ([185.216.177.71]:36798)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bjorn.bidar@HIDDEN>) id 1tO4cu-0003D0-5Q
 for 74905 <at> debbugs.gnu.org; Wed, 18 Dec 2024 19:42:53 -0500
Received: from NordStern (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49])
 by thaodan.de (Postfix) with ESMTPSA id CB3EED00059;
 Thu, 19 Dec 2024 02:42:15 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail;
 t=1734568935; bh=xMkxl57EGr3zHcE3TS+fN0rSia6k2rPDTYL/nnVij8U=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=GZmR7fwA79DHuVdzs3dKWSCQ6CNRKB0KKsE8x2VkMdWzCdndRDwiGeV9o1qKXcz1n
 rjVraPeQ9kOZhknnMzwbk9gMChtA/7754zz62bMRwvMnm0eYN04nZv7r3gqf2tqar2
 uf7ckhWq3xXcG+vdbJem95dR98peuU8fgBn+BTVE6qjIV+Ot6cKUQPOCLRRPe95Jh0
 kgBPdJFKG6dgLPOxCmEnWG66oYWx0QEaXjyIE84RLy0gOd7BoSiMYqTB/bMrkqT5US
 ZVSNeUMtauS9BEKPoxQoY4E7Sq1R/GpaJ3q7FQXbPV7LbiUplhebfyRIOuUN6g92+s
 sNNlLlEGXgsPFPbvahnxwc6lEUdWbD6Lxtw/AJxEHkScUs73bd8e3BxEoj0KQ4SX/n
 ukcx2q7Wtldjr+cYTSR1tF4XXMRDclPJqCJyc2H3oHdCXdim1v+H3yHgoGXKaXXsbR
 G/wDwr4w2SKlvJAliANNbOEJBOTsEMoIlQlAFDPtgjBLL14sT4vMhzD5SvSgKT3Lzf
 uLJVRCOTXR2f0CoGJIatcN5f/fP7kY9Z0/+RasnFsfY1LU7lVoA5CU4Qs1U2W+nPkd
 XNxD9lsWFwDxgC+ht4bTDylE/ggdxGnJdEGffpK9zP0ERoroBV+eELW90OeE9YJbNh
 /u13nINZOhKfMfCmQiTwks38=
From: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
To: James Thomas <jimjoe@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <86ldwcziff.fsf@HIDDEN> (James Thomas's message of "Thu, 19 Dec
 2024 04:51:24 +0530")
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
 <86pllozkq4.fsf@HIDDEN> <86ldwcziff.fsf@HIDDEN>
Autocrypt: addr=bjorn.bidar@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq
 w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV
 CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl
 HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8
 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF
 CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h
 K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2
 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC
 HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN
 XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg
 gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1+ntAhsDBQsJCAcCAiICBhUKCQgL
 AgQWAgMBAh4HAheAAAoJEFwbdKFlHF9oBgwA/iQHwe0VL4Df4GGTYlNjMSHFlIkBmN4UfYGLYj3E
 TrOUAQC51M+M3cjsL8WHdpBz6VAo6df9d+rVwhQ9vQuFHqevArg4BGTX6T4SCisGAQQBl1UBBQEB
 B0Cbohc3JEfn005/cm0AOGjSsW1ZxAkgaoVNjbpqk4MgNAMBCAeIeAQYFgoAIBYhBFHxdut1RzAe
 pymoq1wbdKFlHF9oBQJk1+k+AhsMAAoJEFwbdKFlHF9ooHABAKGmrGBic/Vys3BBrOQiRB3Z7izO
 HwhqTRpAqFZtXS2nAQDZhp/5aYw1TZjTzkm1KVt9QiYnjd/MvxRE9iaY6x4mDbgzBGTX6T4WCSsG
 AQQB2kcPAQEHQAgRJq/tMcCCB2XyA5WZpu7GvpRx0m9IPRWazeqhOq7uiO8EGBYKACAWIQRR8Xbr
 dUcwHqcpqKtcG3ShZRxfaAUCZNf71AIbIgCBCRBcG3ShZRxfaHYgBBkWCgAdFiEEUfF263VHMB6n
 KairXBt0oWUcX2gFAmTX+9QACgkQXBt0oWUcX2jeSwD6AtWn0cuo8IF35YRo4o3cDRJnUfJnbvJy
 GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK
 S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA==
Date: Thu, 19 Dec 2024 02:42:14 +0200
Message-ID: <87y10c1p21.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

James Thomas <jimjoe@HIDDEN> writes:

> James Thomas wrote:
>
>> Bj=C3=B6rn Bidar wrote:
>>
>>> James Thomas <jimjoe@HIDDEN> writes:
>>>
>>>> Bj=C3=B6rn Bidar wrote:
>>>>
>>>>> This patch implements search for nnvirtual. I'm using
>>>>> publi-inbox's
>>>>> with nnvirtual to group each group into one.
>>>>> However searching wasn't possible in these nnvirtual groups.
>>>>> I implemented gnus-search-run-search based on the existing
>>>>> nnselect gnus-search-run-search function.
>>>>
>>>> Thanks! I haven't looked into it, but here are some quick comments:
>>>>
>>>>> I'm looking for feedback on the patch. I don't exactly know how
>>>>> the search function is called when multiple groups of the same
>>>>> type
>>>>> are
>>>>> involved. For nnvirtual each group is its on server, does that
>>>>> mean
>>>>> the
>>>>> function will be always called only for each group? In that case
>>>>> everything should be good.
>>>>
>>>> That seems to be the case: see
>>>> gnus-group-read-ephemeral-search-group
>>>> and gnus-group-make-search-group.
>>>
>>> OK good than my understanding from my tests matched with the rest of
>>> the
>>> code.
>>> Thanks for these examples I haven't looked at the create group
>>> functions
>>> as the searched methods don't have to create groups even when they
>>> start
>>> a new search by another backend just like e.g. if the user would
>>> call
>>> a
>>> search on another imap group.
>>>
>>>>> +(deffoo nnvirtual-request-list (&optional server)
>>>>> +  (when (nnvirtual-possibly-change-server server)
>>>>> +    (with-current-buffer nntp-server-buffer
>>>>> +      (erase-buffer)
>>>>> +      (dolist (group nnvirtual-component-groups)
>>>>> +        (insert (format "%S 0  1 y\n" group))))
>>>>> +    t))
>>>>
>>>> Did you check if gnus-start.el#L1801 withstands this? It seems to
>>>> me
>>>> to
>>>> assume that nnvirtual doesn't have -request-list.
>>>
>>> It does. If the user has falsely add nnvirtual to one of the select
>>> methods than it will call it try to call the function which doesn't
>>> fail
>>> or do anything. The only thing that happens from that is it will
>>> show
>>> the false results as groups contained in the nnvirtual method
>>> without
>>> a
>>> parameter.
>>
>> No, I mean, the point of that code seems to be that nnvirtual is
>> activated _last_, i.e. after any component groups of other backends.
>
> No, sorry, I was a little confused about this. But it seems to me that
> -request-group removes each group from the component list (unlike your
> -request-list). Is that relevant? IDK. The latter seems to do info
> updation as well, based on -always-rescan.
>

Request list supposed to list the available groups on the server it is
also for example used in gnus-search-imap class gnus-search-run-search
function. Since for the case of nnvirtual all groups on the server
are all groups contained in the group it is the right function.

I took all the explenation for each functions purpose from the manual
section linked below:
(info "(gnus) Required Back End Functions")

To me the code just reads like that that for nnvirtual
the groups are activated this way only because
it doesn't have request list.

>
> No, I mean, the point of that code seems to be that nnvirtual is
> activated _last_, i.e. after any component groups of other backends. And
> it's not just select methods: even Foreign Groups are included, no?
>
>> Should verify that nnvirtual has arguments? So far it is possible
>> to add nnvirtual to select methods with "" but this is invalid.
>
> I'm not sure what you mean, but it does have arguments: the components
> regexp, for one.
>

It does have arguments exactly but you can add nnvirtual without
arguments or technically an empty argument to select methods.

>> If nnvirtual isn't added to select methods nothing happens besides
>> the regular activation.
>
> Couldn't someone have added one? Say, with the above argument?

I guess so but that isn't the intended way of using nnvirtual,
also it wouldn't take care of the request of the setup such
as creating the associated group.
Regular activation meant in this context that the request-list function
is called but without a argument the nnvirtual-server doesn't contain
any groups.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 18 Dec 2024 23:21:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 18:21:40 2024
Received: from localhost ([127.0.0.1]:36423 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO3MK-0007V3-7w
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 18:21:40 -0500
Received: from mout.gmx.net ([212.227.15.18]:41923)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jimjoe@HIDDEN>) id 1tO3MI-0007Un-F5
 for 74905 <at> debbugs.gnu.org; Wed, 18 Dec 2024 18:21:39 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1734564091; x=1735168891; i=jimjoe@HIDDEN;
 bh=ZsqUitlTWRA5+nF6yCrd9WPS3WfD4RS2hSlGOLNQyMQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=rHAS+ujX/YhGqAmgG+1X8z9Ig+RmUkK/s38l8vm9kXD4sr/sAhM7PdUK0PRH/3CQ
 WH1FrdJ7NevbI3SGcDStNR8v6utarjfse0QfEtDOFrJc3/mfk/K+W1URZ4V+NsIZr
 BC2tnmN26lbHGh2iO1iSV4qSzaxa0YafgGSViYzX61GwESKMT0qVdLuIpkDR86+ih
 QrJcvk7uVIE+Q6IIn5Rr0PSY1eHdik2gMgIoMh/Rl+cVGsbX3usCYcY3vEMk3eVxg
 LuqtqVTrZADCnR6bjLtprfF9m5suQe67aTm4CHKmDcA36mKNAeyq1Qj70+9ZOp3rX
 iNWGmiYbvO5xnHUGWg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from user-Inspiron-3493 ([42.104.189.106]) by mail.gmx.net (mrgmx004
 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mkpf3-1tr62Q3U5P-00lRKy; Thu, 19
 Dec 2024 00:21:30 +0100
From: James Thomas <jimjoe@HIDDEN>
To: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <86pllozkq4.fsf@HIDDEN> (James Thomas's message of "Thu, 19 Dec
 2024 04:01:47 +0530")
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
 <86pllozkq4.fsf@HIDDEN>
Date: Thu, 19 Dec 2024 04:51:24 +0530
Message-ID: <86ldwcziff.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:eI0dxMqz3D0h2X4YogX4NZYFgoVImRnMbLiohdjdmnfZq6GJO+d
 1j5IlAZIkTaaupS1HfbI1HyjDkdmoZx3vIdVmOsnEoYZ1xtF5cxWqnLMiBJYhXHHp55/cGw
 3iNxqYZYLitpmecKWte4boVq4TfBaAlFZpZpAuOToAIidk4Du1Hg17LiN/+UbzVK1NwGm+7
 3To2RRLWsnwPGddDZV/KA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:ny//z0OTucI=;3qHUysJDSKbHdTuBW3ljxuIEAPb
 hSrZJlrVoIb26HStoIzi/fY76Mh6iNxtARLPDhe6SuCqiWOqQCXidIIcXiFPr7ULMfrIrTrXH
 MnKh3DwQwH3aEOHSmPYtLbiYXghbvGHJgECjsRtAvyQ8M8zLQA721gVf7k2ucxY/5T8dgTelX
 d89NewjlGuHltNPJ9C4w4IT9TtR+Mz3sZUu7hRfgm8NtTvwjLfT4H7wJ3nbmCqtYF5otYw5GP
 3iE+7yxxsjPrh3EuAy2Y11Js+iLxzITbKzkqKu81FnSP5CAmu+YbTxEVNQXQM/i5hhzQWmkhV
 5OvllEAGkXwOaaVakOOdtDATmK0dkrMJQ5T2GuOrmorTGPpMnxqD+z55YpxsWIprB+v7qdYqa
 h0GqArLoh6D097k0LzXbAqzj4ZWK1P9xfCsb2a7E17gFAfP8cuWWfEiJ114C/tOH6kLo6y6pp
 88nae1UrTz7nyst8bVR+EksQ8/fcyXHibw7Qxj+mZMN9JDEeJ2+OUzHKOhflArUFU938YaggG
 oBJJIrOkNxuNzsN0kNQE5Vi4u12UYBAwT+qiFt445cPoq/664FJ6dm9+4tGz9NXoh6dljTLD4
 Q/zZXSZ9qq27l5PRHhDe9wBRA9HbLE7/cBwG79hW8o0sJIPKxvIbqB+g1qoiTD2AdCEs8B1Hw
 yH1MPSySgYs5vA2/j9+G8gVDovvh01tHjyiYECy/sM520ExoN99QkvcIaiBXm+u/5sQ4KcE37
 F0HLd83Q0Ad5+d+Cwo33izikdGDLK6ZHVMg05Fgxht5NpDqVQlYo2qS7o0xncad0gq2M5ZTMF
 aHq1QVsijGyYSmiYo3Nzrci6aIsUiaE4EfBUywDNyIdj/6nL5OCe5YwSV4MEv+yVM4ON+IQnX
 NvMu6CbYQ6K6i8AXdci2rZnrBFp5V+vEWwtRRqEmIGh+XjvS6Y9Z+U7oU4n2DItFOrUT95wo2
 vWOmxwB8fjnrS0ymVj77LLRV3ihiKWYKma5uq1zTTAK8172KziBezefbRE6JgEl/dV0LIi//X
 DQwAtQQUut3ft/+Oe3wablWZB17vYG81R797EA0qsfr/PnsEme2b+8i85C67StnXsaEwO3iWG
 6sPlJEjCsx2qewtxwDuGhzpOHprjAz
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

James Thomas wrote:

> Bj=C3=B6rn Bidar wrote:
>
>> James Thomas <jimjoe@HIDDEN> writes:
>>
>>> Bj=C3=B6rn Bidar wrote:
>>>
>>>> This patch implements search for nnvirtual. I'm using
>>>> publi-inbox's
>>>> with nnvirtual to group each group into one.
>>>> However searching wasn't possible in these nnvirtual groups.
>>>> I implemented gnus-search-run-search based on the existing
>>>> nnselect gnus-search-run-search function.
>>>
>>> Thanks! I haven't looked into it, but here are some quick comments:
>>>
>>>> I'm looking for feedback on the patch. I don't exactly know how
>>>> the search function is called when multiple groups of the same
>>>> type
>>>> are
>>>> involved. For nnvirtual each group is its on server, does that
>>>> mean
>>>> the
>>>> function will be always called only for each group? In that case
>>>> everything should be good.
>>>
>>> That seems to be the case: see
>>> gnus-group-read-ephemeral-search-group
>>> and gnus-group-make-search-group.
>>
>> OK good than my understanding from my tests matched with the rest of
>> the
>> code.
>> Thanks for these examples I haven't looked at the create group
>> functions
>> as the searched methods don't have to create groups even when they
>> start
>> a new search by another backend just like e.g. if the user would
>> call
>> a
>> search on another imap group.
>>
>>>> +(deffoo nnvirtual-request-list (&optional server)
>>>> +  (when (nnvirtual-possibly-change-server server)
>>>> +    (with-current-buffer nntp-server-buffer
>>>> +      (erase-buffer)
>>>> +      (dolist (group nnvirtual-component-groups)
>>>> +        (insert (format "%S 0  1 y\n" group))))
>>>> +    t))
>>>
>>> Did you check if gnus-start.el#L1801 withstands this? It seems to
>>> me
>>> to
>>> assume that nnvirtual doesn't have -request-list.
>>
>> It does. If the user has falsely add nnvirtual to one of the select
>> methods than it will call it try to call the function which doesn't
>> fail
>> or do anything. The only thing that happens from that is it will
>> show
>> the false results as groups contained in the nnvirtual method
>> without
>> a
>> parameter.
>
> No, I mean, the point of that code seems to be that nnvirtual is
> activated _last_, i.e. after any component groups of other backends.

No, sorry, I was a little confused about this. But it seems to me that
-request-group removes each group from the component list (unlike your
-request-list). Is that relevant? IDK. The latter seems to do info
updation as well, based on -always-rescan.

--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 18 Dec 2024 22:32:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 17:32:06 2024
Received: from localhost ([127.0.0.1]:36361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO2aM-00059k-08
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 17:32:06 -0500
Received: from mout.gmx.net ([212.227.17.22]:43957)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jimjoe@HIDDEN>) id 1tO2aJ-00059A-6g
 for 74905 <at> debbugs.gnu.org; Wed, 18 Dec 2024 17:32:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1734561116; x=1735165916; i=jimjoe@HIDDEN;
 bh=xqOXSI0jziY7MD82v2ZEAq1jlQU1+Izt6fmtdGilCNo=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=nTzZn0FhhNNlA16GpHGiqowrY37S6t107gHkeObeUMjMvzPoxcsbuLwysCYDG8GN
 adGMx3uswa7vWocbRFYcAI5FdQv4crer4QtT05Kcx6WmzDIR1KlF1wuljsNMjJg1Y
 BzvlWuymitWW2xagHvGry5urA0aC1CbdOJ9grzsEIhzQspcomysQdfXuRM2MXYi0k
 PjAjza7/VqMStEuzM/VBNBj/3jV5LB5QIzQ/ykiqtOAnmvYu/kH3E5sdx6ehTlgje
 Z6gjG8ldY5fpmL4Aaom/0+rs4uHyZ23705AFY7RWGKiRSD1wA8pdVCh7DeVk4JEMl
 e0U5BLBHJd/CMqCFig==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from user-Inspiron-3493 ([42.108.27.245]) by mail.gmx.net (mrgmx104
 [212.227.17.174]) with ESMTPSA (Nemesis) id 1M6ll8-1tVCFR2tUE-004kVq; Wed, 18
 Dec 2024 23:31:56 +0100
From: James Thomas <jimjoe@HIDDEN>
To: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <87bjx96ln5.fsf@HIDDEN> (=?utf-8?Q?=22Bj=C3=B6rn?= Bidar"'s
 message of "Wed, 18 Dec 2024 17:44:46 +0200")
References: <86zfktesxb.fsf@HIDDEN> <87bjx96ln5.fsf@HIDDEN>
Date: Thu, 19 Dec 2024 04:01:47 +0530
Message-ID: <86pllozkq4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:UZEoqQKFZSWjsuj61KG/eY/okje6o8zt0Z5j75YkiamSBMpbl2g
 zBb6ihu/Z5wZsP+Dc9yqwJgRxTkTgnrsuXArT8oIjmMJ7wIX/xbfOj8FWC1/ArajdrjpmHi
 3SKIq1uwg5wILVLmzKpgagic3Q+GsZsSZFK69XqgF9Gjx7o/hNynM6MBJtGTRSXIHjSC3AW
 qXhuJp45hDrVwYofHKT/w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:p/1qsmx212c=;Kw4jpDaQ+IaCaxAcro+ZnIj54pt
 7QMIrSG2xvIjCNp0B8gvVW55CUukXqkHzCVy5d5T/BXCy8aybqjXnhfXLKo9Y/NpSw7nRQEsm
 2aXKRC8tuV/bRzHuMSN31qGrNPjVeqH/PIXTpMmK0OhNQY5AdW0Yw7uYp0XyoVIYiRlppcP1B
 gXSM6W8K6YiOLxXA3KwzIL5Q4YWguGzsjJfXcRvNJyQMu7/ucz1QmeQMOr0jkZlCOcNW4axEx
 fY17/fqQIVDktyOYB23SAH6aX4Y95V/59nwohACE4mjODqyEja2qTeE2cbivAcPDZRnD3Dknw
 8rsCnvZ330VLQLCOPkXbZcRrNa0vnsp/0ONSfb0Lbdam6zD6pMo4T8LNeFkr/v1vHQS2EUED+
 oUh6/L+3NUcPAirhCGgtgoJq0Bx60zDVnDFiYngiYeTlwrez16obImekug5j6SmvsKXoGj6yH
 /KXq3oBoBxICQXmjksxaN6l1I377laMNSiAHUgnmqNZd5iZnXbqJItGBuvri38OqqZn01qcgb
 9nAKTCUKYqqXO6RwFlWTGnhbmAmqE70b7y/hnRaCdCitK2ZM+Va8/WLSXoGIoWN5k/amQgQit
 GXWr5viyNxSk0WMfsUe+/yw7OtsCZSaqqkDov87fjwix6GU14co1D1zaBlDp7QCvLchv3lLDW
 iIqs53ecacJlt2t0JAh3010uSx3wfvKcW8MGCGiabRWJxK1PFyK2vN12BA5SAQnpWaNqwY5SG
 vnPzjkOuCLUzcZhd83qtsEPnQUpI8eo3MfcjXtOFCJiX1yr0EIyjR5sVzJ39EhQJQwo9S2674
 7xRD4SLRFp1K0KjmKcePbFCLDXdjZSChrILQi4PnhaUKiyBWMKIOWax0lweGTiVvIjQJlpFlI
 7lozI+ulqSArankz/Ei9U1v4UnsGTKkxNfgFJ66XDmkiXgoSUwRjj7ScGTxuUdYtffhuHNEW2
 /cEhHl8dY0tLrU1xI3GAG2O2wMk4t3YWHRNBFpZFtLEo9W4sX4b9gu4PwwwvkAHSha3B129w0
 HUGxwTvvqj45MeD1cR/YrjHEh76VUyfENxcxgoNqDNnGXuhKZE7D0TtbnwS/E7P3TiNDQ25Z8
 7cizJXDvWJlIyi7UJPn2s3gVN1r7vp
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Bj=C3=B6rn Bidar wrote:

> James Thomas <jimjoe@HIDDEN> writes:
>
>> Bj=C3=B6rn Bidar wrote:
>>
>>> This patch implements search for nnvirtual. I'm using publi-inbox's
>>> with nnvirtual to group each group into one.
>>> However searching wasn't possible in these nnvirtual groups.
>>> I implemented gnus-search-run-search based on the existing
>>> nnselect gnus-search-run-search function.
>>
>> Thanks! I haven't looked into it, but here are some quick comments:
>>
>>> I'm looking for feedback on the patch. I don't exactly know how
>>> the search function is called when multiple groups of the same type
>>> are
>>> involved. For nnvirtual each group is its on server, does that mean
>>> the
>>> function will be always called only for each group? In that case
>>> everything should be good.
>>
>> That seems to be the case: see
>> gnus-group-read-ephemeral-search-group
>> and gnus-group-make-search-group.
>
> OK good than my understanding from my tests matched with the rest of
> the
> code.
> Thanks for these examples I haven't looked at the create group
> functions
> as the searched methods don't have to create groups even when they
> start
> a new search by another backend just like e.g. if the user would call
> a
> search on another imap group.
>
>>> +(deffoo nnvirtual-request-list (&optional server)
>>> +  (when (nnvirtual-possibly-change-server server)
>>> +    (with-current-buffer nntp-server-buffer
>>> +      (erase-buffer)
>>> +      (dolist (group nnvirtual-component-groups)
>>> +        (insert (format "%S 0  1 y\n" group))))
>>> +    t))
>>
>> Did you check if gnus-start.el#L1801 withstands this? It seems to me
>> to
>> assume that nnvirtual doesn't have -request-list.
>
> It does. If the user has falsely add nnvirtual to one of the select
> methods than it will call it try to call the function which doesn't
> fail
> or do anything. The only thing that happens from that is it will show
> the false results as groups contained in the nnvirtual method without
> a
> parameter.

No, I mean, the point of that code seems to be that nnvirtual is
activated _last_, i.e. after any component groups of other backends. And
it's not just select methods: even Foreign Groups are included, no?

> Should verify that nnvirtual has arguments? So far it is possible
> to add nnvirtual to select methods with "" but this is invalid.

I'm not sure what you mean, but it does have arguments: the components
regexp, for one.

> If nnvirtual isn't added to select methods nothing happens besides
> the regular activation.

Couldn't someone have added one? Say, with the above argument?

(Btw I'm only helping out, y'know. Getting this in is up to others with
commit rights)

--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 18 Dec 2024 15:45:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 10:45:36 2024
Received: from localhost ([127.0.0.1]:35631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tNwEx-00021T-UQ
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 10:45:36 -0500
Received: from [185.216.177.71] (port=55662 helo=thaodan.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bjorn.bidar@HIDDEN>) id 1tNwEv-000216-5L
 for 74905 <at> debbugs.gnu.org; Wed, 18 Dec 2024 10:45:34 -0500
Received: from NordStern (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49])
 by thaodan.de (Postfix) with ESMTPSA id 64029D0004F;
 Wed, 18 Dec 2024 17:44:47 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail;
 t=1734536687; bh=3YXzffF/HjeP1wSiUV+2W7tJ6f1+O3cPE+sSCeMBFdw=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=1qIUMBHcQYk9/d9RfmA6T+ekMuP7FeSlF8ontbTB4tG2AaxENWerG89N8+TUFjPp+
 WHDfg3h2XMnGrDXmBPZqauKE+kXpP2H7oLv0vn445DFOItJqSUvJ0kmC9xK2C8j5jF
 IlEoAGd+qiLdN418tznveewLuJri7jXxsKcPadNctcJda7A/DFka1tI31iF8ZgBryn
 942DXB3Ymp4RAecfwpKTLrFKwdWTn/Gbfh20rsyUKNoygzqSxkUm1KNd8ewpgl+dAp
 putbOUDkKJcJwrahUVFQEwpo2V70bDO3UvtXNB5paMcqSX06+zpXmDVLCDUyO0rAP+
 x1J6wc4xU06UXTgz+Sn4MCFnGttgFDqu8TUXC5IiaCjs4si/80XSw6lb8Uk2M2PJkX
 yLnyxxYC4A3bGpunPtdvCBPXQoCHVhdrXm/eM+AEW8t3utzqpApqoUajzKd22WR5GV
 KmYElLKZIUFoxODjN1xuH/74WOcE/ZIPs89BPbnheNFVj+kFqZw9T6yIVpaEQp3q5W
 8eQO/7MmkiwtwzqodECuR7NwKqfQ3dG8dIqluzimQTaahRHO2tscW101eQ5JOcUBJt
 rONz8ThzGv+7R8Ai7REE9CNovDLfYF1xUs0CrZVudj0gr4xi2u/vA359XcBRdEDHwZ
 PpGhcqBQamrLXlOVXVaHXJ/s=
From: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
To: James Thomas <jimjoe@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <86zfktesxb.fsf@HIDDEN> (James Thomas's message of "Wed, 18 Dec
 2024 05:58:00 +0530")
References: <86zfktesxb.fsf@HIDDEN>
Autocrypt: addr=bjorn.bidar@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq
 w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV
 CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl
 HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8
 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF
 CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h
 K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2
 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC
 HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN
 XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg
 gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1+ntAhsDBQsJCAcCAiICBhUKCQgL
 AgQWAgMBAh4HAheAAAoJEFwbdKFlHF9oBgwA/iQHwe0VL4Df4GGTYlNjMSHFlIkBmN4UfYGLYj3E
 TrOUAQC51M+M3cjsL8WHdpBz6VAo6df9d+rVwhQ9vQuFHqevArg4BGTX6T4SCisGAQQBl1UBBQEB
 B0Cbohc3JEfn005/cm0AOGjSsW1ZxAkgaoVNjbpqk4MgNAMBCAeIeAQYFgoAIBYhBFHxdut1RzAe
 pymoq1wbdKFlHF9oBQJk1+k+AhsMAAoJEFwbdKFlHF9ooHABAKGmrGBic/Vys3BBrOQiRB3Z7izO
 HwhqTRpAqFZtXS2nAQDZhp/5aYw1TZjTzkm1KVt9QiYnjd/MvxRE9iaY6x4mDbgzBGTX6T4WCSsG
 AQQB2kcPAQEHQAgRJq/tMcCCB2XyA5WZpu7GvpRx0m9IPRWazeqhOq7uiO8EGBYKACAWIQRR8Xbr
 dUcwHqcpqKtcG3ShZRxfaAUCZNf71AIbIgCBCRBcG3ShZRxfaHYgBBkWCgAdFiEEUfF263VHMB6n
 KairXBt0oWUcX2gFAmTX+9QACgkQXBt0oWUcX2jeSwD6AtWn0cuo8IF35YRo4o3cDRJnUfJnbvJy
 GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK
 S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA==
Date: Wed, 18 Dec 2024 17:44:46 +0200
Message-ID: <87bjx96ln5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  James Thomas <jimjoe@HIDDEN> writes: > Björn Bidar wrote:
    > >> This patch implements search for nnvirtual. I'm using publi-inbox's
   >> with nnvirtual to group each group into one. >> However searching wasn't
    possible in these nnvirtual g [...] 
 
 Content analysis details:   (1.3 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                            [185.216.177.71 listed in bl.score.senderscore.com]
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [185.216.177.71 listed in sa-accredit.habeas.com]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.3 RDNS_NONE              Delivered to internal network by a host with no rDNS
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

James Thomas <jimjoe@HIDDEN> writes:

> Bj=C3=B6rn Bidar wrote:
>
>> This patch implements search for nnvirtual. I'm using publi-inbox's
>> with nnvirtual to group each group into one.
>> However searching wasn't possible in these nnvirtual groups.
>> I implemented gnus-search-run-search based on the existing
>> nnselect gnus-search-run-search function.
>
> Thanks! I haven't looked into it, but here are some quick comments:
>
>> I'm looking for feedback on the patch. I don't exactly know how
>> the search function is called when multiple groups of the same type
>> are
>> involved. For nnvirtual each group is its on server, does that mean
>> the
>> function will be always called only for each group? In that case
>> everything should be good.
>
> That seems to be the case: see gnus-group-read-ephemeral-search-group
> and gnus-group-make-search-group.

OK good than my understanding from my tests matched with the rest of the
code.
Thanks for these examples I haven't looked at the create group functions
as the searched methods don't have to create groups even when they start
a new search by another backend just like e.g. if the user would call a
search on another imap group.

>> +(deffoo nnvirtual-request-list (&optional server)
>> +  (when (nnvirtual-possibly-change-server server)
>> +    (with-current-buffer nntp-server-buffer
>> +      (erase-buffer)
>> +      (dolist (group nnvirtual-component-groups)
>> +        (insert (format "%S 0  1 y\n" group))))
>> +    t))
>
> Did you check if gnus-start.el#L1801 withstands this? It seems to me to
> assume that nnvirtual doesn't have -request-list.

It does. If the user has falsely add nnvirtual to one of the select
methods than it will call it try to call the function which doesn't fail
or do anything. The only thing that happens from that is it will show
the false results as groups contained in the nnvirtual method without a
parameter.
Should verify that nnvirtual has arguments? So far it is possible
to add nnvirtual to select methods with "" but this is invalid.

If nnvirtual isn't added to select methods nothing happens besides
the regular activation.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at 74905 <at> debbugs.gnu.org:


Received: (at 74905) by debbugs.gnu.org; 18 Dec 2024 00:28:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 17 19:28:21 2024
Received: from localhost ([127.0.0.1]:60816 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tNhvI-0007A2-LL
	for submit <at> debbugs.gnu.org; Tue, 17 Dec 2024 19:28:20 -0500
Received: from mout.gmx.net ([212.227.17.21]:42505)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jimjoe@HIDDEN>) id 1tNhvH-00079o-8E
 for 74905 <at> debbugs.gnu.org; Tue, 17 Dec 2024 19:28:20 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1734481690; x=1735086490; i=jimjoe@HIDDEN;
 bh=dA7mB9b/IgxY/VAIkAN78gbzBYlhMCn33ZBP9Juv97Y=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date:
 Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=M7tYD8BkSIoTcj5HzAoAxNIBSa8601m0Pns8giXmQ3Pxm/cLAKdPCxbzZF87qpDi
 ZAj8x8lC2Hlbzl50DnhgpVTHhPvlUVFu6Z2JYeAm9dTni3I0tzAFRv1PY+Ao9wNcx
 KThjBbFAzYB04HQ9eAz41sgNH6r7NUS0wNX1ejYp9FwHt2L2uu1WCWRbtcAuDFdGF
 KIwQTGC8r43rnCVRdKqV95MYKqtBDKozYUekle+/QmHN7k1QC9suKhtKQ+f/2+0l/
 vtHuSIAMs+GDenjGDHdIuKH7tf+XnPaJVK9Sx4dEktFLVp0tSVA95K5Oc4v815czm
 cwmGApOJiZcj+sEqWQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from user-Inspiron-3493 ([42.108.28.196]) by mail.gmx.net (mrgmx105
 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mlf4c-1tnj591n7q-00k5DP; Wed, 18
 Dec 2024 01:28:10 +0100
From: James Thomas <jimjoe@HIDDEN>
To: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
Subject: Re: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
In-Reply-To: <87jzc0a4cm.fsf@> (=?utf-8?Q?=22Bj=C3=B6rn?= Bidar"'s message
 of "Mon, 16 Dec 2024 01:55:37 +0200")
References: 
Importance: high
Date: Wed, 18 Dec 2024 05:58:00 +0530
Message-ID: <86zfktesxb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:ZCdkdMUGVUFInIPu2TiNV3c8/yMDIIGO/yg06yh/ankIzokGmjD
 leVHAxoYrxTexFVm7K37SYeofXNF+boLTMzFzy10tisgYl1ZpTCD5vg4lHUiZlmLlXyqUjU
 mzQNVZbsPcHkDcX0TIPWGCrAJzIR6jkL70Bndr4BZ77zmdzsGXseZIAALodCgUOf46qaXoI
 RD8uDVoHLjd6DoE7jjzTA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:JVh4GxBO/LM=;kI6qpVglZsQVe0eHmtysZOdelW0
 yPdXHH4ncPwXQVCVJOmB/heaidyt+0QVChE1yx71EbThCmAap5qz2ap4/894Zg2Z0j89MVrRv
 QezyWgTivTMJc6/gB+arynxqYy+l9tz3VaiycrW762Hxm9GMHbpz8RdTrCGZL7H1LgRgKBkGN
 D05iN3/4bZpULMQPrt2Q78rGwDDymwXiguxVK18Y+BMVzQvdUa6xKWkjHkvnDJk6xnQG+TRuj
 KHcaHvskm5R/BteD9hSxjlmoYqb6fMNPjYWotW6PHHRW2lTU8VMGhb+DTIP/SpKLVCwfmdjvN
 8YVbJL8U9iRT+8jOA3jsaiwa0jLrK/wti0POJsWs0QgqUImu2tHTS9fg0+PpgyGmbQ4cbd+rF
 Ic8LbRcaoe7Cq7+lQW8CL2MCHDZuJUCT28gTzUlubwmrYMRj3qohFjjPXZSNHgewrBiOqNSAr
 6hFX4/z9ZZdM8uZz49PLS0BquZQ1eF5uJc1CLDHljXzYN3N0gyU1gPKB2VNDTkaUjkmYWHMAP
 CZOM5aZkPt94fTmi/XDJjJji5SzjJcn6RwU6JIg0NH56uXKLRwxbrA/RdmUtHqgOLgqvhHKJT
 UeQl2xN/TvHsyZBYrDw9z0cYR+3CIfZT7lFwSmpqHJGQKfjfeF/iOcjiTQq4ZtcLMRJyuSIBk
 lqCUVgixGK8DNI5wW+lTlmwhqFM0r34o4VB5Sg2o4n0jd4Ug7nmCm6tZgRqM81Pxy46Z6IgyW
 rTdnJuptq7a3LjSIsrXiV5rdNFFHwElRPSHSdNFh7h3NGj7FINt3UYxPgnCr/3OoZJ0pmQ9ks
 rbnq2wfdtQkEuNn8ozTMwTIAGHj05c9ClMc/Uuv+ruQDtSxmDRwZna4lCdnipFpeVfTTfSv9p
 y3t3NIfLnC20D9dWKKaX7LSq4nmWQB+I5zwYedvseL2qbREeu8UWcn1nN0XznQ61k8q3W2413
 YFEmQC6i/o7dKYMqiinrTCZ2I2z3QfDGFTsxIDQ+QmnA3fFDtPAeHJw3IUykN/0z05C5MBcMQ
 xqkBpeuAKNfU6kJcA/P2SdtpPRCzbYfhBsbkWDq7v6V2YP1W0fPUYyqNsSy25fsaPhy3kqSrg
 28iHgxxXfjyaNfJfuU56p4Y//A6RyJ
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74905
Cc: 74905 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Bj=C3=B6rn Bidar wrote:

> This patch implements search for nnvirtual. I'm using publi-inbox's
> with nnvirtual to group each group into one.
> However searching wasn't possible in these nnvirtual groups.
> I implemented gnus-search-run-search based on the existing
> nnselect gnus-search-run-search function.

Thanks! I haven't looked into it, but here are some quick comments:

> I'm looking for feedback on the patch. I don't exactly know how
> the search function is called when multiple groups of the same type
> are
> involved. For nnvirtual each group is its on server, does that mean
> the
> function will be always called only for each group? In that case
> everything should be good.

That seems to be the case: see gnus-group-read-ephemeral-search-group
and gnus-group-make-search-group.

> +(deffoo nnvirtual-request-list (&optional server)
> +  (when (nnvirtual-possibly-change-server server)
> +    (with-current-buffer nntp-server-buffer
> +      (erase-buffer)
> +      (dolist (group nnvirtual-component-groups)
> +        (insert (format "%S 0  1 y\n" group))))
> +    t))

Did you check if gnus-start.el#L1801 withstands this? It seems to me to
assume that nnvirtual doesn't have -request-list.

--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2024 23:58:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 15 18:58:09 2024
Received: from localhost ([127.0.0.1]:52676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tMyUq-00037z-LR
	for submit <at> debbugs.gnu.org; Sun, 15 Dec 2024 18:58:08 -0500
Received: from lists.gnu.org ([209.51.188.17]:49632)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bjorn.bidar@HIDDEN>) id 1tMyUn-00037p-6g
 for submit <at> debbugs.gnu.org; Sun, 15 Dec 2024 18:57:58 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bjorn.bidar@HIDDEN>)
 id 1tMySh-0004xB-JE
 for bug-gnu-emacs@HIDDEN; Sun, 15 Dec 2024 18:55:47 -0500
Received: from thaodan.de ([2a03:4000:4f:f15::1])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bjorn.bidar@HIDDEN>)
 id 1tMySd-00017w-NJ
 for bug-gnu-emacs@HIDDEN; Sun, 15 Dec 2024 18:55:47 -0500
Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49])
 by thaodan.de (Postfix) with ESMTPSA id 45609D0008E
 for <bug-gnu-emacs@HIDDEN>; Mon, 16 Dec 2024 01:55:39 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail;
 t=1734306939; bh=h7M/N1sB06mMZBdeRZTVoEZMM/iBfBQ9tmF/2Ib6iJ0=;
 h=From:To:Subject:Date;
 b=x7rDW6UFE/QCTkclTdLW6pNAgnyMg9PA8+wqQ7oxTGjm5jS9McOjUXOETmlX8KQcx
 MI1yAtCFocX9f99sphv40APhv7zjhrsFmKCUN1JpMTPqUoVWi6+cgZdgpbT6zPh9QP
 oRruDl9SVBBeyqJUZjjLCoar7xfGvJZDB0ikqMHosmo71vt8skZeOLkqBulTdotbNY
 debWDKNoedh0ZxuSBDJ4e5zFM+lD2Em/ebdU+x+Wy+qahHpCl250gl49IkZbycfL+U
 G5yHiAlK0BoMKN1zoTPOGjsREfBhMR1HvQF9g9KF2YVQPMW3FssxlGJzrMAxEUM7AU
 hvv9hcfRYKt9d2XwFhvXB+6FmfNpt19T/0tk0Ey09I1YqTH1NGvn3V0cIJyHTI6Xq+
 Xjsr82bVDQ7ilIQ2YCYUEKEbZKW/l8sVncRWbi2ICW0I49HIcRU/moPXiJJBk+sNiH
 TTJ/LwHpudwc6XlR9Zofc55L/gB4YJqOv4uh+XTuHHCFvE8Zqbx68t0n6ksNKLjlpg
 uiuQYWf8V0brDjE1jlqC9Seea+L/GOWepkyolLuJ/jIWptpb7Bk4pl0eCak8MRG/UV
 fHgD4MlZnvElgE0LGAck42O62iFDSLi+pKzU9arLO6RUrHo2GjaSFYxi57N8nzf2Ym
 hN0+F3eJV1wx2PAvMQyibfHg=
From: =?utf-8?Q?Bj=C3=B6rn?= Bidar <bjorn.bidar@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Implement search for nnvirtual Gnus groups
X-Debbugs-Cc: ding@HIDDEN
Autocrypt: addr=bjorn.bidar@HIDDEN; prefer-encrypt=nopreference; keydata=
 mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq
 w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV
 CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl
 HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8
 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF
 CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h
 K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2
 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC
 HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN
 XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg
 gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1+ntAhsDBQsJCAcCAiICBhUKCQgL
 AgQWAgMBAh4HAheAAAoJEFwbdKFlHF9oBgwA/iQHwe0VL4Df4GGTYlNjMSHFlIkBmN4UfYGLYj3E
 TrOUAQC51M+M3cjsL8WHdpBz6VAo6df9d+rVwhQ9vQuFHqevArg4BGTX6T4SCisGAQQBl1UBBQEB
 B0Cbohc3JEfn005/cm0AOGjSsW1ZxAkgaoVNjbpqk4MgNAMBCAeIeAQYFgoAIBYhBFHxdut1RzAe
 pymoq1wbdKFlHF9oBQJk1+k+AhsMAAoJEFwbdKFlHF9ooHABAKGmrGBic/Vys3BBrOQiRB3Z7izO
 HwhqTRpAqFZtXS2nAQDZhp/5aYw1TZjTzkm1KVt9QiYnjd/MvxRE9iaY6x4mDbgzBGTX6T4WCSsG
 AQQB2kcPAQEHQAgRJq/tMcCCB2XyA5WZpu7GvpRx0m9IPRWazeqhOq7uiO8EGBYKACAWIQRR8Xbr
 dUcwHqcpqKtcG3ShZRxfaAUCZNf71AIbIgCBCRBcG3ShZRxfaHYgBBkWCgAdFiEEUfF263VHMB6n
 KairXBt0oWUcX2gFAmTX+9QACgkQXBt0oWUcX2jeSwD6AtWn0cuo8IF35YRo4o3cDRJnUfJnbvJy
 GxyCDThR+zYBAKG6/jdwmZkBQZKslnDAbMMd2WfiZZT5JW3IWC4EaKMO7HkBAKYPGZ3UbfkRvfFK
 S+pQ9CgtNfkSJQBtT1Ob7Y6nsacgAQCpyXN7yppmhW/oBgivITPy9Lkg+V4NK9WZYZCU9Q7LBA==
Date: Mon, 16 Dec 2024 01:55:37 +0200
Message-ID: <87jzc0a4cm.fsf@>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a03:4000:4f:f15::1;
 envelope-from=bjorn.bidar@HIDDEN; helo=thaodan.de
X-Spam_score_int: -14
X-Spam_score: -1.5
X-Spam_bar: -
X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, INVALID_MSGID=0.568,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.2 (-)

--=-=-=
Content-Type: text/plain

Tags: patch


This patch implements search for nnvirtual. I'm using publi-inbox's
with nnvirtual to group each group into one.
However searching wasn't possible in these nnvirtual groups.
I implemented gnus-search-run-search based on the existing
nnselect gnus-search-run-search function.

I'm looking for feedback on the patch. I don't exactly know how
the search function is called when multiple groups of the same type are
involved. For nnvirtual each group is its on server, does that mean the
function will be always called only for each group? In that case
everything should be good.



In GNU Emacs 31.0.50 (build 1, x86_64-suse-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.2)
Repository revision: b25fba0ef8f38f95a9e65548f9ebb6c92739857e
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101014
System Description: openSUSE Tumbleweed

Configured using:
 'configure --disable-build-details --without-pop --with-mailutils
 --without-hesiod --with-gameuser=:games --with-kerberos
 --with-kerberos5 --with-file-notification=inotify --with-modules
 --enable-autodepend --enable-link-time-optimization --prefix=/usr
 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
 --localstatedir=/var --sharedstatedir=/var/lib
 --libexecdir=/usr/libexec --with-file-notification=yes
 --libdir=/usr/lib64 --with-native-compilation=aot
 --enable-locallisppath=/usr/share/emacs/31.0.50/site-lisp:/usr/share/emacs/site-lisp
 --with-x --with-xim --with-sound --with-xpm --with-jpeg --with-tiff
 --with-gif --with-png --with-rsvg --with-dbus --with-xft --without-gpm
 --with-tree-sitter --with-x-toolkit=gtk --without-pgtk
 --with-toolkit-scroll-bars --x-includes=/usr/include
 --x-libraries=/usr/lib64 --with-libotf --with-m17n-flt --with-cairo
 --build=x86_64-suse-linux --with-dumping=pdumper
 build_alias=x86_64-suse-linux 'CC=sccache cc' 'CFLAGS=-O2 -Wall
 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
 -Werror=return-type -flto=auto -march=znver3 -mmmx -mpopcnt -msse
 -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -msse4a -mno-fma4
 -mno-xop -mfma -mbmi -mbmi2 -maes -mpclmul -mno-gfni -mvpclmulqdq
 -mno-3dnow -madx -mabm -mno-cldemote -mclflushopt -mclwb -mclzero
 -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp
 -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mmwaitx -mno-pconfig -mpku
 -mprfchw -mno-ptwrite -mrdpid -mrdrnd -mrdseed -mno-rtm -mno-serialize
 -mno-sgx -msha -mshstk -mno-tbm -mno-tsxldtrk -mvaes -mno-waitpkg
 -mwbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile
 -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl
 -mno-avxvnni -mno-avxifma -mno-avxvnniint8 -mno-avxneconvert
 -mno-cmpccxadd -mno-amx-fp16 -mno-prefetchi -mno-raoint
 -mno-amx-complex --param l1-cache-size=32 --param l1-cache-line-size=64
 --param l2-cache-size=512 -mtune=znver3 -fno-optimize-sibling-calls -O2
 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
 -Werror=return-type -flto=auto -g -D_GNU_SOURCE
 -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS
 -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label
 -DPDMP_BASE='\''"emacs-gtk"'\''' LDFLAGS=-Wl,-O2 'CXX=sccache c++'
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Implement-search-for-nnvirtual-Gnus-groups.patch

From 4b24c759e19aa2998a150f424e8187b052d7d5e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@HIDDEN>
Date: Mon, 16 Dec 2024 01:28:16 +0200
Subject: [PATCH] Implement search for nnvirtual Gnus groups

* lisp/gnus/nnvirtual.el (nnvirtual-request-list): Implement
request list backend function for nnvirtual.
* lisp/gnus/gnus-search.el (gnus-search-nnvirtual): Implement
function to build search queries for nnvirtual.
(gnus-search-default-search-engines, gnus-search-server-to-enngine):
Include nnvirtual.
---
 lisp/gnus/gnus-search.el | 29 ++++++++++++++++++++++++++---
 lisp/gnus/nnvirtual.el   |  7 +++++++
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index ca82546ef82..4a7cf902b32 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -795,6 +795,9 @@ shared-initialize
 (defclass gnus-search-nnselect (gnus-search-engine)
   nil)
 
+(defclass gnus-search-nnvirtual (gnus-search-engine)
+  nil)
+
 (defclass gnus-search-imap (gnus-search-engine)
   ((literal-plus
     :initarg :literal-plus
@@ -953,14 +956,16 @@ 'nnir-method-default-engines
   'gnus-search-default-engines "28.1")
 
 (defcustom gnus-search-default-engines '((nnimap . gnus-search-imap)
-                                         (nnselect . gnus-search-nnselect))
+                                         (nnselect . gnus-search-nnselect)
+                                         (nnvirtual . gnus-search-nnvirtual))
   "Alist of default search engines keyed by server method."
-  :version "26.1"
+  :version "31.1"
   :type `(repeat (cons (choice (const nnimap) (const nntp) (const nnspool)
 			       (const nneething) (const nndir) (const nnmbox)
 			       (const nnml) (const nnmh) (const nndraft)
 			       (const nnfolder) (const nnmaildir)
-                               (const nnselect))
+                               (const nnselect)
+                               (const nnvirtual))
 		       (choice
 			,@(mapcar
 			   (lambda (el) (list 'const (intern (car el))))
@@ -1086,6 +1091,23 @@ gnus-search-run-search
                                (cons 'search-group-spec group-spec))))))))
     artlist))
 
+;; nnvirtual interface
+(cl-defmethod gnus-search-run-search ((_engine gnus-search-nnvirtual)
+                               srv query-spec _groups)
+  ;; fixme groups vs srv which of?
+  ;; in theory the function could get multiple groups of one server
+  ;; but for nnvirtual server = group
+  (save-excursion
+    (let* (;; Not really a server but the matching groups for the nnvirtual group
+          (grouplist (mapcar #'gnus-group-short-name (gnus-search-get-active srv)))
+          ;; group each group as list containing each server and their groups
+          (group-spec (nnselect-categorize grouplist (lambda (x) (gnus-group-server x))))
+          (artlist []))
+      (setq artlist (vconcat artlist
+                             (gnus-search-run-query
+                              (list (cons 'search-query-spec query-spec)
+                                    (cons 'search-group-spec group-spec)))))
+      artlist)))
 
 ;; imap interface
 (cl-defmethod gnus-search-run-search ((engine gnus-search-imap)
@@ -2153,6 +2175,7 @@ gnus-search-server-to-engine
 	    ('namazu 'gnus-search-namazu)
 	    ('find-grep 'gnus-search-find-grep)
 	    ('imap 'gnus-search-imap)
+            ('nnvirtual 'gnus-search-nnvirtual)
 	    (_ server))
 	  inst
 	  (cond
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index 79747dca31f..edc97a8ca63 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -293,6 +293,13 @@ nnvirtual-close-group
     (nnvirtual-update-read-and-marked t t))
   t)
 
+(deffoo nnvirtual-request-list (&optional server)
+  (when (nnvirtual-possibly-change-server server)
+    (with-current-buffer nntp-server-buffer
+      (erase-buffer)
+      (dolist (group nnvirtual-component-groups)
+        (insert (format "%S 0  1 y\n" group))))
+    t))
 
 (deffoo nnvirtual-request-newgroups (_date &optional _server)
   (nnheader-report 'nnvirtual "NEWGROUPS is not supported."))
-- 
2.45.2


--=-=-=--




Acknowledgement sent to Björn Bidar <bjorn.bidar@HIDDEN>:
New bug report received and forwarded. Copy sent to ding@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to ding@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#74905; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.