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 16792 invoked from network); 28 Jun 2021 23:16:15 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 28 Jun 2021 23:16:15 -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) (envelope-from ) id 1ly0U9-00Aj8C-6X for ml@inbox.vuxu.org; Mon, 28 Jun 2021 18:16:13 -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 1ly0U8-005hri-M1 for ml@inbox.vuxu.org; Mon, 28 Jun 2021 18:16:12 -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 1ly0U6-005hra-Et for ding@lists.math.uh.edu; Mon, 28 Jun 2021 18:16:10 -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 1ly0U4-008kM3-Fq for ding@lists.math.uh.edu; Mon, 28 Jun 2021 18:16:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=TCELArch6/gv4qoR4k3RoGa0sdWCHVYOPaIbFOreC9U=; b=fEYlVWIyHezJL3CMrrBUvnRwzb iHdb6OELLCzh1wv+yKAbiYPh/xZTAU4qjvEhL1YYZyrhYoY9E1mAlP+wOagQsmcMexqRnSX8EE5Ag AwDDj5QiRBpbeGjXAFIIUVLf3xFGUxMpIMg9PTbtjA8ydsy407GlbBXE4EPAaFLL1F/c=; Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ly0Tx-0007TT-5C for ding@gnus.org; Tue, 29 Jun 2021 01:16:03 +0200 Received: from localhost (c-24-18-235-43.hsd1.wa.comcast.net [24.18.235.43]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 43F5EFEB2F; Mon, 28 Jun 2021 23:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1624922157; bh=TCELArch6/gv4qoR4k3RoGa0sdWCHVYOPaIbFOreC9U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fpuifXQlFAqGrlGHwMLqfVUpKMD1Uhti0PzpTRfgDfDdsmJF4VpIfV00RP12mNIl6 d/SJPxwBpxNs6AFWoVCulKrCij2eLdbZx03IUbpga4EdA3UeMtN9Yk5gX2t4K+V5YY 9sHMaug9pbx2Vtr+mCrzubQEmbZOe0HkfN51gq0E= From: Eric Abrahamsen To: Adam =?utf-8?Q?Sj=C3=B8gren?= Cc: ding@gnus.org Subject: Re: Help testing gnus-search fixups References: <87sg12uejj.fsf@ericabrahamsen.net> <87fsx1g98n.fsf@tullinup.koldfront.dk> Date: Mon, 28 Jun 2021 16:15:55 -0700 In-Reply-To: <87fsx1g98n.fsf@tullinup.koldfront.dk> ("Adam =?utf-8?Q?Sj?= =?utf-8?Q?=C3=B8gren=22's?= message of "Mon, 28 Jun 2021 20:00:24 +0200") Message-ID: <877didvavo.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Adam Sj=C3=B8gren writes: > Eric writes: > >> if you're using notmuch or namazu, please help me give this a whirl! > > Which version of Emacs is your patch against? I just tried applying it > to master@2a33fc8d19 and got: It applies to up-to-date master -- there's one other change that went into this function since your current revision. The changes are confined to the one function, so you could also just eval this definition: (cl-defmethod gnus-search-indexed-parse-output ((engine gnus-search-indexed) server query &optional groups) (let ((prefix (or (slot-value engine 'remove-prefix) "")) artlist article group) (goto-char (point-min)) ;; Prep prefix, we want to at least be removing the root ;; filesystem separator. (when (stringp prefix) (setq prefix (file-name-as-directory (expand-file-name prefix "/")))) (while (not (or (eobp) (looking-at-p "\\(?:[[:space:]\n]+\\)?Process .+ finished"))) (pcase-let ((`(,f-name ,score) (gnus-search-indexed-extract engine))) (when (and f-name (file-readable-p f-name) (null (file-directory-p f-name))) (setq group (replace-regexp-in-string "[/\\]" "." (replace-regexp-in-string "/?\\(cur\\|new\\|tmp\\)?/\\'" "" (replace-regexp-in-string "\\`\\." "" (string-remove-prefix prefix (file-name-directory f-name)) nil t) nil t) nil t)) (setq article (file-name-nondirectory f-name) article ;; TODO: Provide a cleaner way of producing final ;; article numbers for the various backends. (if (string-match-p "\\`[[:digit:]]+\\'" article) (string-to-number article) (nnmaildir-base-name-to-article-number (substring article 0 (string-match ":" article)) group (string-remove-prefix "nnmaildir:" server)))) (when (and (numberp article) (or (null groups) (member group groups))) (push (list f-name article group score) artlist))))) ;; Are we running an additional grep query? (when-let ((grep-reg (alist-get 'grep query))) (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)))) artlist)))