From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas 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: Thu, 19 Dec 2024 04:01:47 +0530 Message-ID: <86pllozkq4.fsf@gmx.net> References: <86zfktesxb.fsf@gmx.net> <87bjx96ln5.fsf@thaodan.de> Reply-To: James Thomas 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="6551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74905@debbugs.gnu.org To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 18 23:39:59 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 1tO2hz-0001X5-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Dec 2024 23:39:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tO2cA-0007Bg-I5; Wed, 18 Dec 2024 17:33:59 -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 1tO2bI-0005cr-9D for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 17:33:06 -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 1tO2bH-0003iO-MO for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 17:33:03 -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=xqOXSI0jziY7MD82v2ZEAq1jlQU1+Izt6fmtdGilCNo=; b=W8NoGrhZCH2OMw0Mou9xIMwGbZfN5v6GBMRFjMCpiXoDMvhPaXR6tbTXG+q37dMHctUPUcCWNIN3RSWaD73NEgdmnko2GLK/8pwmFc0kyF6KK3eGzQ/Gcwo/TSn6k2vrqXyJlwPj4t0OKhUGKNqMrn9SLk8PIOug0RQvcZvWzIwvgZMl9w3ZJ73+q3oMEV3ae/LL4Jp9BUZP3x8jobb2Wb9ywFwBvVEDA7ogNsUnF97PwAL9QUe1sOLZANc1nkl93Ms7Tl5sLzUPQ4gbSbtIiyuA8oNtiTjOcdGNJlzgL/gq/VARg3RtBiCNb1gVKiwV7JG5PqJiZ+zdBZWfMFxOmQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tO2bG-0005B8-Fj for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 17:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2024 22:33:02 +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.173456112619828 (code B ref 74905); Wed, 18 Dec 2024 22:33:02 +0000 Original-Received: (at 74905) by debbugs.gnu.org; 18 Dec 2024 22:32:06 +0000 Original-Received: from localhost ([127.0.0.1]:36361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tO2aM-00059k-08 for submit@debbugs.gnu.org; Wed, 18 Dec 2024 17:32:06 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:43957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tO2aJ-00059A-6g for 74905@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@gmx.net; 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 Original-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 In-Reply-To: <87bjx96ln5.fsf@thaodan.de> ("=?UTF-8?Q?Bj=C3=B6rn?= Bidar"'s message of "Wed, 18 Dec 2024 17:44:46 +0200") X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sVzJ39EhQJQwo9S267 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:297350 Archived-At: Bj=C3=B6rn Bidar wrote: > 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. 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) --