From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21348 invoked from network); 5 Aug 2021 17:15:36 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 5 Aug 2021 17:15:36 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mBgxy-009f0Z-7H for ml@inbox.vuxu.org; Thu, 05 Aug 2021 12:15:34 -0500 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1mBgxx-00DLlV-Hp for ml@inbox.vuxu.org; Thu, 05 Aug 2021 12:15:33 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1mBgxw-00DLlQ-Hi for ding@lists.math.uh.edu; Thu, 05 Aug 2021 12:15:32 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1mBgxu-00HNlO-2g for ding@lists.math.uh.edu; Thu, 05 Aug 2021 12:15:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kl2j8jrtPkm2lfNitEZ72q3XAjIiVw1mz40aagY5HxM=; b=R+9MJUrt+iqvKj/jQvfMe/QgCd 237jI/P+UEJ8sjMBzjck1Ctyv7ZYuqyj4zh2jlIGC1ugVjqtf6yeZYYclbpP/Wg/Z2DieO5j5Q3DV T7HVtFvnfVsvdEDitEh1H09DR8zP9OmjEZ+xngIlHIUT+WwrrXXOaH9K8KDV0xB0FwCo=; Received: from mail.ericabrahamsen.net ([52.70.2.18]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBgxm-00074o-CP for ding@gnus.org; Thu, 05 Aug 2021 19:15:24 +0200 Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 9CFA6FA08F; Thu, 5 Aug 2021 17:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1628183718; bh=kl2j8jrtPkm2lfNitEZ72q3XAjIiVw1mz40aagY5HxM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fNCTLvVOgSDzKOslhyHF1cVUJLiy6apG3fZhejZ2HZgi3P2waMwV3jpH60W8ZVdKv NmXV4MxUImPasHa8tn0KQRkmn0yQX1y1kYRwgw7kfeyZlM151FqjnBO49WvYs+QYR1 yvXSvARLe/NTRkBzUWzzWJGdwbOdScMOo3/GG6VU= From: Eric Abrahamsen To: Alexandr Vityazev Cc: Joseph Mingrone , ding@gnus.org Subject: Re: Help testing gnus-search fixups References: <87sg12uejj.fsf@ericabrahamsen.net> <87fsx1g98n.fsf@tullinup.koldfront.dk> <877didvavo.fsf@ericabrahamsen.net> <87eeclnhl5.fsf@tullinup.koldfront.dk> <87a6n9ov0e.fsf@tullinup.koldfront.dk> <87zgv97x1u.fsf@ku.dk> <87pmw4ly9a.fsf@tullinup.koldfront.dk> <87k0mclxo8.fsf@tullinup.koldfront.dk> <87zgv7thls.fsf@ericabrahamsen.net> <87bl6tuqcb.fsf@posteo.org> <87mtqd83f7.fsf@ericabrahamsen.net> <87bl6sual8.fsf@posteo.org> <87h7gj9x2w.fsf@ericabrahamsen.net> <87fsw21w3k.fsf@posteo.org> <86bl6j650f.fsf@phe.ftfl.ca> <87r1ffoatn.fsf@posteo.org> <87lf5ntupj.fsf@ericabrahamsen.net> Date: Thu, 05 Aug 2021 10:15:15 -0700 In-Reply-To: <87lf5ntupj.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 30 Jul 2021 13:25:44 -0700") Message-ID: <87pmur4xuk.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-ID: Precedence: bulk --=-=-= Content-Type: text/plain Eric Abrahamsen writes: [...] > I'm getting to it! I just need to find a moment to sit down and set up > some dummy data and test the various possible configurations. It > shouldn't be to hard to unilaterally force prefixed group names where > that's needed, and force unprefixed names elsewhere, I just need to > find the time. I'd like to get this fixed once and for all. Okay, I think I've finally got it. The incoming group names are indeed prefixed or not depending on whether the server is primary or not (arguably this should be fixed to always unprefixed in nnselect, but I'll worry about that later), so this patch enforces unprefixed group names within the function body, and prefixed group names in the return value. Please give it a shot! Eric --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-search-groups-fix.diff diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 53af2f6fe6..d92122f2bd 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1358,6 +1358,7 @@ gnus-search-indexed-parse-output server query &optional groups) (let ((prefix (or (slot-value engine 'remove-prefix) "")) + (groups (mapcar #'gnus-group-short-name groups)) artlist article group) (goto-char (point-min)) ;; Prep prefix, we want to at least be removing the root @@ -1404,10 +1405,12 @@ gnus-search-indexed-parse-output (setq artlist (gnus-search-grep-search engine artlist grep-reg))) ;; Munge into the list of vectors expected by nnselect. (mapcar (pcase-lambda (`(,_ ,article ,group ,score)) - (vector group article - (if (numberp score) - score - (string-to-number score)))) + (vector + (gnus-group-full-name group server) + article + (if (numberp score) + score + (string-to-number score)))) artlist))) (cl-defmethod gnus-search-indexed-extract ((_engine gnus-search-indexed)) --=-=-=--