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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29816 invoked from network); 29 Jun 2021 16:07:54 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 29 Jun 2021 16:07:54 -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 1lyGHA-00BDQF-6S for ml@inbox.vuxu.org; Tue, 29 Jun 2021 11:07:52 -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 1lyGH9-005qmH-N7 for ml@inbox.vuxu.org; Tue, 29 Jun 2021 11:07:51 -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 1ly6rE-005lQ2-RK for ding@lists.math.uh.edu; Tue, 29 Jun 2021 01:04:28 -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 1ly6rB-008wHy-Ou for ding@lists.math.uh.edu; Tue, 29 Jun 2021 01:04:28 -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=grJi3bS46HT4nLYXIPFMiuSajX+ycHylDNAHsbEYFTE=; b=Ntmd1aqvHAmi1qpfS8suQotczM 9IlBx0yro2RBFRAlJb8hoARBU13vHYopo63e9Jgo6/oroVbs28LEP/H85+N/lOQq9370PqBZFIZXi IrTGG2SXY45tpwxkwpGlEQuRjVScjIsuo96ON5rZ3tZLd9X9Tel4a1Bhk2X4U4w004OU=; Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ly6r3-0002As-2g for ding@gnus.org; Tue, 29 Jun 2021 08:04:21 +0200 Received: by mail-lf1-x136.google.com with SMTP id q16so23174331lfr.4 for ; Mon, 28 Jun 2021 23:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=grJi3bS46HT4nLYXIPFMiuSajX+ycHylDNAHsbEYFTE=; b=of/tqJBrBmOOGTJPZNaXB7mr72FERuWkKhSLxUafEepXdvQDbATt4haYkO7hnibQKk jGRdvqS+I4nOh3TQhfPV9C7KOo42q1J7gUcEMpV99f8N5qHuQb3gHDqOe/ogtmooEu2R Ta6Gwii+gxA95SDIc8aB+tHSUO9VeSKNLtmdfJ2ytXd0zLeI/7kHVsz2QoEg3SfJFzkx A2YVvwBmgHa0FmU01ZoBJBUKWNUc9C4lLUH80V3rPFijhRcOE/E4XRGYe3oDIev/n6gf Ulin5GEC55GgysrG2AtmezeID+ffXJqP3/irU/MKO0tyeiJXx2lL7x2Prw90uqcYzGYT lYfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=grJi3bS46HT4nLYXIPFMiuSajX+ycHylDNAHsbEYFTE=; b=Ldk8HhujoxC178fmftLdyV7QA1BQ4QcMMkp4TwkBL0yQdYWxqVkoWXpbaZDf4cQ19l NIhdvGCAp6/uCb1fASGgMXeNfd1saU3aRB2Y6d4KrFWI8xEUf289OkrYsoB4tO6f19vq uKTpOzm3OCo39xxvl7M2p7eIaqOKzTHyBna8OBm+vT6nH5uU/5ukakyK4ckRcDjFw4Hu dr4B1XlBQMNbEaUAryUurciYNDEfr8xc8iA1enzHOJdd1hnAvOeOba8ZgCIUQ/zVpc3h Ok1TUV6jgkz8lhyrZBDssq7DEoIG15XsWhjv/FTLMp5g/+TNIlQqQ/DyI9qO1p0tqgEi McAA== X-Gm-Message-State: AOAM533qHk2ikzfkBdLMroDrvWRbuKTiPPULgv5WDEl2QQ8v7++QXQeT sElR5j2sueX1tQnt09SXQ39BQHS+iAk= X-Google-Smtp-Source: ABdhPJyTbPmrXIIPjgUwtCf01bdUVMbzkHwrm9YyYvHHSVhEvwGa0HDlsar/eCa8wMrgHgXGeXhlxA== X-Received: by 2002:ac2:4f92:: with SMTP id z18mr21014504lfs.343.1624946656454; Mon, 28 Jun 2021 23:04:16 -0700 (PDT) Received: from sund3583 (176-22-227-14-dynamic.dk.customer.tdc.net. [176.22.227.14]) by smtp.gmail.com with ESMTPSA id b19sm1780856ljo.37.2021.06.28.23.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 23:04:15 -0700 (PDT) From: Thomas Alexander Gerds X-Google-Original-From: Thomas Alexander Gerds To: Eric Abrahamsen Cc: Adam =?iso-8859-1?Q?Sj=F8gren?= , ding@gnus.org Subject: Re: Help testing gnus-search fixups References: <87sg12uejj.fsf@ericabrahamsen.net> <87fsx1g98n.fsf@tullinup.koldfront.dk> <877didvavo.fsf@ericabrahamsen.net> Date: Tue, 29 Jun 2021 08:04:14 +0200 In-Reply-To: <877didvavo.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 28 Jun 2021 16:15:55 -0700") Message-ID: <87v95x9pgh.fsf@biostat.ku.dk> 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 I see 2 issues: 1. you may need=20 (setq group (gnus-group-full-name group server)) before (setq article (file-name-nondirectory f-name) ... 2. with the patch=20 (member group groups) is nil when I use search-group-spec to '("nnml:" . ("nnml:")) to match all nnml groups. cheers Eric Abrahamsen writes: > 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-index= ed) > 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))) > > > --=20 7LL-1 Make peace with your past so it doesn=E2=80=99t spoil your present.