From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74905: [PATCH] Implement search for nnvirtual Gnus groups Date: Wed, 18 Dec 2024 17:44:46 +0200 Message-ID: <87bjx96ln5.fsf@thaodan.de> References: <86zfktesxb.fsf@gmx.net> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34734"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74905@debbugs.gnu.org To: James Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 18 16:46:44 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tNwG2-0008rB-Ci for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Dec 2024 16:46:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNwFg-0004gZ-Ek; Wed, 18 Dec 2024 10:46:20 -0500 Original-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 ) id 1tNwFO-0004e5-EN for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 10:46:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNwFO-0002U0-5c for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 10:46:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=SCcXjKNdHCErZuJGi8vHQSH0mnCMDMz6BCiW7G7pOL8=; b=HvdOLjtP0VB5RM9VUep8HXZGA3QAarX+7T2orPaQ6WQr9r3aHamD55RWzdF/JUJ9Vyz6N4VFPz09A80jGSbKsiWOelYdCVrRt6Ykl8aPM04ZWOIUpdSfRYAk1EddKE5td8mWsLuyXsdGwJY2GjENfkPznAZwCA0VVGBRGQ4zeKDUICZd59+5dv1w1/vwyzGv3+lA4oILLCKWtrEy+Vj26AvOojeABadv+n/oMaumt5oIsx/LvXwXGAk8PdauFo0zSRj8Ol/BtdT02y4pTPnVk2Ttx1Cw7pQsz31HLAd00VfVnEaBSEQARmTh0LEDGwvGm6hvXLx081KxBloGgis0gQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNwFN-00022K-Nv for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 10:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2024 15:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74905 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74905-submit@debbugs.gnu.org id=B74905.17345367367784 (code B ref 74905); Wed, 18 Dec 2024 15:46:01 +0000 Original-Received: (at 74905) by debbugs.gnu.org; 18 Dec 2024 15:45:36 +0000 Original-Received: from localhost ([127.0.0.1]:35631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNwEx-00021T-UQ for submit@debbugs.gnu.org; Wed, 18 Dec 2024 10:45:36 -0500 Original-Received: from [185.216.177.71] (port=55662 helo=thaodan.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNwEv-000216-5L for 74905@debbugs.gnu.org; Wed, 18 Dec 2024 10:45:34 -0500 Original-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= In-Reply-To: <86zfktesxb.fsf@gmx.net> (James Thomas's message of "Wed, 18 Dec 2024 05:58:00 +0530") Autocrypt: addr=bjorn.bidar@thaodan.de; 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 gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297340 Archived-At: James Thomas 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.