From: "Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: James Thomas <jimjoe@gmx.net>
Cc: 74905@debbugs.gnu.org
Subject: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups
Date: Thu, 19 Dec 2024 02:42:14 +0200 [thread overview]
Message-ID: <87y10c1p21.fsf@thaodan.de> (raw)
In-Reply-To: <86ldwcziff.fsf@gmx.net> (James Thomas's message of "Thu, 19 Dec 2024 04:51:24 +0530")
James Thomas <jimjoe@gmx.net> writes:
> James Thomas wrote:
>
>> Björn Bidar wrote:
>>
>>> James Thomas <jimjoe@gmx.net> 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 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.
next prev parent reply other threads:[~2024-12-19 0:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87jzc0a4cm.fsf@>
2024-12-18 0:28 ` bug#74905: [PATCH] Implement search for nnvirtual Gnus groups James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-18 15:44 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-18 22:31 ` James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-18 23:21 ` James Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 0:42 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-15 23:55 Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y10c1p21.fsf@thaodan.de \
--to=bug-gnu-emacs@gnu.org \
--cc=74905@debbugs.gnu.org \
--cc=bjorn.bidar@thaodan.de \
--cc=jimjoe@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).