GNU bug report logs - #73581
29.4; Gnus: Error doing a search on nnmaildir with gnus-search-find-grep

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,gnus; Reported by: Daniel Cerqueira <dan.list@HIDDEN>; dated Tue, 1 Oct 2024 15:55:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 12 Apr 2025 12:54:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 08:54:12 2025
Received: from localhost ([127.0.0.1]:54395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3aN8-000530-MS
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 08:54:12 -0400
Received: from forward501b.mail.yandex.net ([178.154.239.145]:35126)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dan.list@HIDDEN>)
 id 1u3aN5-00050T-6D
 for 73581 <at> debbugs.gnu.org; Sat, 12 Apr 2025 08:54:09 -0400
Received: from mail-nwsmtp-smtp-production-main-57.sas.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-57.sas.yp-c.yandex.net
 [IPv6:2a02:6b8:c11:797:0:640:5446:0])
 by forward501b.mail.yandex.net (Yandex) with ESMTPS id 2E8156108D;
 Sat, 12 Apr 2025 15:53:58 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-57.sas.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id urDCq4JLZa60-Vw9uv18k; 
 Sat, 12 Apr 2025 15:53:57 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1744462437;
 bh=guJVEOMSD+j3v1jKJK4ogrFSbEd83NQ0xbP5Z4aLhZE=;
 h=Message-ID:References:Date:Cc:In-Reply-To:Subject:To:From;
 b=pCvanEbGwBw6eVaCWW7KZRe7xrp3UxGb2aqQDLCXjbrf43ofMKg46w424wmJM6AOg
 E2pOp0O8E/vwCMLzs0I8TD1Qr3rJ5yL4PRMHhnJOAu8W+QZ2fORNNU+c9M8syuQGGp
 qqzxyQEjzYX/ZVfu/20nYNtunWzj0pDKLd45LH1Y=
Authentication-Results: mail-nwsmtp-smtp-production-main-57.sas.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87y0w560so.fsf@HIDDEN> (Visuwesh's message of "Sat, 12 Apr
 2025 17:37:19 +0530")
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
 <87jz7qv8em.fsf@HIDDEN> <87ecxy6lgf.fsf@HIDDEN>
 <87semdvmje.fsf@HIDDEN> <878qo57pnq.fsf@HIDDEN>
 <87plhha9u4.fsf@HIDDEN> <87y0w560so.fsf@HIDDEN>
OpenPGP: id=0x964FC110C40AD575;
 url="https://openpgpkey.lispclub.com/.well-known/openpgpkey/lispclub.com/hu/wwhaoe1fy5idwyj4xx847eqerems5rwb?l=dan.list";
 preference=signencrypt
X-Hashcash: 1:28:250412:visuweshm@HIDDEN::9E/DPSmwQ7A6qc5t:ROKa
X-Hashcash: 1:28:250412:73581 <at> debbugs.gnu.org::hhCfVm2NQ62Z8+nh:2S2N7
Date: Sat, 12 Apr 2025 13:53:47 +0100
Message-ID: <87y0w5k0bo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Visuwesh <visuweshm@HIDDEN> writes:

> [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=8F=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=
=B2=E0=AF=8D 12, 2025] Daniel Cerqueira wrote:
>

[...]

>>> I can give a shot at debugging, when I have time, if you provide the
>>> backtrace.  Getting the find-grep backend to work was a goal for me, you
>>> gave me a good excuse to procrastinate from working on my thesis.  ;-)
>>
>> Ahaha!  Now it is giving no error.  But it is also not resulting a
>> result (from a search query that I know it has matches).
>>
>> The message that I get is:
>>
>> Group nnselect:nnselect-87tt6taade.fsf contains no messages
>>
>> I also have changed this variable:
>>
>> (set 'gnus-search-default-engines
>>       '((nnimap . gnus-search-imap)
>>         (nnmaildir . gnus-search-find-grep)
>>         (nnselect . gnus-search-nnselect)
>>         ;; (nnselect . gnus-search-find-grep)
>>         ))
>>
>> Maybe this variable is incorrect?  What I want is for the nnmaildir
>> back-end to use find-grep.
>
> I modify that exact variable to make nnmaildir use
> gnus-search-find-grep.  I forgot to pass the mandatory argument to
> forward-whitespace.  Please try the patch below instead,
>
> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el

[...]

It is working.  No errors.  But I don't understand what functionality
you did add.  Can you document this or, the meantime, tell me?

>>>> Okay.  Regarding subject, I understand grep not doing it; but regarding
>>>> time, something can be done with find (it is find-grep after all).  No
>>>> need or no pressure in doing it, though.
>>>
>>> I don't think we can exploit the various time statistics attached with a
>>> file to achieve what you want.  A message from 2019 reports:
>>>
>>>     % stat ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
>>>       File: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
>>>       Size: 8420      	Blocks: 24         IO Block: 4096   regular file
>>>     Device: 8,4	Inode: 5774494     Links: 1
>>>     Access: (0600/-rw-------)  Uid: ( 1000/     viz)   Gid: ( 1000/    =
 viz)
>>>     Access: 2025-04-12 13:46:05.575388637 +0530
>>>     Modify: 2022-01-08 18:13:32.297967005 +0530
>>>     Change: 2022-06-05 07:44:16.919565297 +0530
>>>      Birth: 2022-01-08 18:13:32.297967005 +0530
>>>    % grep ^Date: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D=
1:2,S
>>>    Date: Mon, 21 Jan 2019 02:14:48 -0800
>>
>> What I was thinking is using the arguments of the executable find, such
>> as atime, ctime, mtime (which one fits best?), when using a query for
>> time, such as since:3d (I believe the keyword for other queries is
>> "since:", but I am not sure of this).
>
> The problem is mtime, ctime and atime are clearly not reliable as shown
> in the example above.  So we cannot rely on them to indirectly query the
> Date header.

Since "grep:" is also unable to specify to search in a mail field or in
the body, etc. I was thinking that `find` would also not be able to
search in the Date header.  It does make sense.  It would only search on
the attributes of the file (with mtime, ctime or atime).


Also, not that is with 'list-all-buffers function, the buffer *Buffer
List* shows this line:

  *  *gnus-search-           4008 Fundamental      ~/Mail/

Something is missing in *gnus-search- .  Maybe this is revealing a bug
that hasn't quite done damage, yet.

Have a good thesis writing :-) .

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmf6YlwWHGRhbi5saXN0
QGxpc3BjbHViLmNvbQAKCRCWT8EQxArVdaSED/0QYE8deTMKiC9Z2fAKWjBuKEXm
gUW3bT70PgJg6Qc9Wm/S7StBue3vhgz4m6iGxM30hAO0D2fXRf8178JbGMjcHNdP
HOEtNU/YCai5zBLKck/AVTLP9Iodkj8whx+kdv7WdN4lmWYRnxVSHe/Mooo7snFI
z+YTHNCELYBe5sY3UnJKmP+l0+6j3O6iHMojPw3fQNV/RGLD/slr/vViScwLP2Gq
tklTfPKKjyaeDKh9PKu7+pBLZlTMoVo9uf4202frN2PvO7w7wDmPQNlWfmU0Clgs
itn4rdcDswQ8bLKN/9/70HhfZ4w3fbZ8LLqBqNHTUVQu3o/OfKlLM28wDEc3deko
An/8QXLw0rGxSW7ne7GtuVZyWNVVJcBVgMeXrO2q73AvsRI3tooA2T1vYVtBGnfb
E3VDkp++T9OwAI1qnoR95t8SXxn+4ZLJnWpDWORcRoC6B67FNqT24SFvQ4QEgY4i
ZrlmMmxvr8lPUHpPciyYyjNWKEgrsh9C/0WaMGCncaNxCbK+5D10cIJwQaos7do8
y+vspXZoBXvQ7lwQvIQRH1E/OU5dmV4jrTWQnAMIBpTcFzBMpwyTCrugWs6ocEjp
Y6zsSdZA+HTnE7ZlEXRraeLOVU8z7oVGI85rYV4iQaFFuIRR5uJUIfRE0owHu6GP
+0L/g2JCjjh/9wxY8g==
=tOzt
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 12 Apr 2025 12:07:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 08:07:35 2025
Received: from localhost ([127.0.0.1]:54336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3Ze2-00059f-1Q
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 08:07:35 -0400
Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:48366)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>)
 id 1u3Zdy-00058V-Dz
 for 73581 <at> debbugs.gnu.org; Sat, 12 Apr 2025 08:07:32 -0400
Received: by mail-pf1-x442.google.com with SMTP id
 d2e1a72fcca58-736aa9d0f2aso3356132b3a.0
 for <73581 <at> debbugs.gnu.org>; Sat, 12 Apr 2025 05:07:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744459644; x=1745064444; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=OpppzuCwzn5HiiZ9CpIAxf5RfTEg63QMDqtS46SGS7Y=;
 b=BIQCIhftTa7Ff/rhznF7TkM0MgeJn1v9PTv9nIRqzJlewmIlX77CLUQQuewQxVA1u9
 CAnlVTz7OQyHaYDwEdoofydXyBPVfS32MoKCZhyyxPKbNE60N+iRrSMQykSGjhTuB8yc
 YEmXmehwx/eNbUC8VgvC5XQe+t34U1YG22aH2li6Z+aoewZLxJbtSpSpryMVKPd3J//D
 2KbBmjCI8DHXXB021WWMdmjVHECkV0SRNqRWD7P7MCmlsF2vizkVFOrSo2fNlJC2G+Eo
 CXei3MPGLXrTHt2vxMxjAWZLY7RHEsmv0MGxlUdSsQFDn6ej+9U3P511kEqQVcu1CrH1
 tf1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744459644; x=1745064444;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=OpppzuCwzn5HiiZ9CpIAxf5RfTEg63QMDqtS46SGS7Y=;
 b=DwI7kCCXlu9KVNi+Y7qFwN/svylj8lLY1gg47RhWHfSR9GqEQlBI+TaEH0pHWQyDoU
 YEu2+3Vj5xRqnPMTUv22D2vTa5orGHLzWV7mOe49wJqzCNIaOveWPKPqpC4DxOSIUpqa
 nEcEnXC3aiwHqe/ejQ+9H1OZfF6TBKG9i4CpfX67lG6h4WFWvDY46wC8uVaBs0JZV2U/
 VkkNWLKILOycFOC8yEP0Knl/JFuAgzpYoocOg1jBZLwdFseH/XfvkYdHUu9o6aSU5GWt
 glpV7SZ/kmMyb8MBYm9zIAbztF1aAjkJo5fAxrgink7GvwByMaJq80pcnEF34biCkHc5
 ZcjQ==
X-Gm-Message-State: AOJu0Yyrcqw7nnud6ujniuM+YVth9js0fVGQ5CvDFPAv7BjEAHGS8q9k
 KZW7qUO7wj2CupKil1co4wwqlZJxhGHuiN3fF2TP+32611EIcC3r
X-Gm-Gg: ASbGnct16ZWOxWV9sii45oCO8JnhXZRp7ZML8G4unEvqOSELVLF1yQTSYZ0GwyUbzkh
 OcpgnL0MX/ZVhhvhHmuJ405FKIQdEXQiDVRTT5lC9TqjalNiPWEJZk11a3plQAls/mdoBtKbj6a
 F6bPcBDsuSF2I7TutFPPA1YKV5KHDkq8N+y8tH1SaXnMOfz48A1kiwl6ZGEMcjOl1+oLSyZu+Ip
 G/rEa/llUue37RdaLRy2AuXxjTLOs8joXI/dyL/HTBIAJRsc4tcJCH9r+uM+CTowb50NvzVZ1wO
 EoW3PHUOfuU64YlAQDZJosbkV2o3TYa345tgdN71zIoZa674
X-Google-Smtp-Source: AGHT+IEazFBlSmYx3PqyvjScqhIe5nZySKcpAPzQFfwyrjdr5aT2t1cIfcnP0ROTp4MrAjaZ2WZ5ww==
X-Received: by 2002:a05:6a20:c78c:b0:1f5:8e39:9470 with SMTP id
 adf61e73a8af0-20179921de0mr10134198637.31.1744459643926; 
 Sat, 12 Apr 2025 05:07:23 -0700 (PDT)
Received: from localhost ([115.240.90.130])
 by smtp.gmail.com with UTF8SMTPSA id
 d2e1a72fcca58-73bd2199d57sm3279063b3a.32.2025.04.12.05.07.22
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 12 Apr 2025 05:07:23 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Daniel Cerqueira <dan.list@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87plhha9u4.fsf@HIDDEN>
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
 <87jz7qv8em.fsf@HIDDEN> <87ecxy6lgf.fsf@HIDDEN>
 <87semdvmje.fsf@HIDDEN> <878qo57pnq.fsf@HIDDEN>
 <87plhha9u4.fsf@HIDDEN>
Date: Sat, 12 Apr 2025 17:37:19 +0530
Message-ID: <87y0w560so.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=8F=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=
=E0=AF=8D 12, 2025] Daniel Cerqueira wrote:

>>> The patch did not work.  I haven't recorded the message error, but it
>>> was something to do with the something-generate-artlist having the wrong
>>> number of arguments.
>>>
>>> You don't need to fix it, if you don't want to, have too much work, or
>>> don't have time.
>>
>> I can give a shot at debugging, when I have time, if you provide the
>> backtrace.  Getting the find-grep backend to work was a goal for me, you
>> gave me a good excuse to procrastinate from working on my thesis.  ;-)
>
> Ahaha!  Now it is giving no error.  But it is also not resulting a
> result (from a search query that I know it has matches).
>
> The message that I get is:
>
> Group nnselect:nnselect-87tt6taade.fsf contains no messages
>
> I also have changed this variable:
>
> (set 'gnus-search-default-engines
>       '((nnimap . gnus-search-imap)
>         (nnmaildir . gnus-search-find-grep)
>         (nnselect . gnus-search-nnselect)
>         ;; (nnselect . gnus-search-find-grep)
>         ))
>
> Maybe this variable is incorrect?  What I want is for the nnmaildir
> back-end to use find-grep.

I modify that exact variable to make nnmaildir use
gnus-search-find-grep.  I forgot to pass the mandatory argument to
forward-whitespace.  Please try the patch below instead,

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 41915a0e3c0..d6450bbbaff 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -2110,20 +2140,31 @@ gnus-search-prepare-query
 	val)
     (when (stringp query)
       ;; Look for these meta keys:
-      (while (string-match
-	      "\\(thread\\|grep\\|limit\\|raw\\):\\([^ ]+\\)"
-	      query)
-	(setq val (match-string 2 query))
-	(setf (alist-get (intern (match-string 1 query)) query-spec)
-	      ;; This is stupid.
-	      (cond
-	       ((equal val "t"))
-	       ((null (zerop (string-to-number val)))
-		(string-to-number val))
-	       (t val)))
-	(setq query
-	      (string-trim (replace-match "" t t query 0)))
-	(setf (alist-get 'query query-spec) query)))
+      (with-temp-buffer
+        (insert query)
+        (goto-char (point-min))
+        (while (re-search-forward "\\(thread\\|grep\\|limit\\|raw\\):" nil=
 t)
+          (setq val (cons
+                     (match-string 1)
+                     (buffer-substring (point)
+                                       (if (eq (char-after) ?\")
+                                           (progn (forward-sexp) (point))
+                                         (progn (forward-whitespace 1)
+                                                (if (eobp)
+                                                    (point)
+                                                  (1- (point))))))))
+          (setf (alist-get (intern (car val)) query-spec)
+                ;; This is stupid.
+                (cond
+	         ((equal (cdr val) "t"))
+	         ((null (zerop (string-to-number (cdr val))))
+		  (string-to-number (cdr val)))
+	         (t (string-trim (cdr val) "\"" "\""))))
+          (setq query (string-trim (string-replace
+                                    (concat (car val) ":" (cdr val))
+                                    ""
+                                    query)))
+          (setf (alist-get 'query query-spec) query))))
     (when (and gnus-search-use-parsed-queries
 	       (null (alist-get 'raw query-spec)))
       (setf (alist-get 'parsed-query query-spec)


>>> Okay.  Regarding subject, I understand grep not doing it; but regarding
>>> time, something can be done with find (it is find-grep after all).  No
>>> need or no pressure in doing it, though.
>>
>> I don't think we can exploit the various time statistics attached with a
>> file to achieve what you want.  A message from 2019 reports:
>>
>>     % stat ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
>>       File: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
>>       Size: 8420      	Blocks: 24         IO Block: 4096   regular file
>>     Device: 8,4	Inode: 5774494     Links: 1
>>     Access: (0600/-rw-------)  Uid: ( 1000/     viz)   Gid: ( 1000/     =
viz)
>>     Access: 2025-04-12 13:46:05.575388637 +0530
>>     Modify: 2022-01-08 18:13:32.297967005 +0530
>>     Change: 2022-06-05 07:44:16.919565297 +0530
>>      Birth: 2022-01-08 18:13:32.297967005 +0530
>>    % grep ^Date: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1=
:2,S
>>    Date: Mon, 21 Jan 2019 02:14:48 -0800
>
> What I was thinking is using the arguments of the executable find, such
> as atime, ctime, mtime (which one fits best?), when using a query for
> time, such as since:3d (I believe the keyword for other queries is
> "since:", but I am not sure of this).

The problem is mtime, ctime and atime are clearly not reliable as shown
in the example above.  So we cannot rely on them to indirectly query the
Date header.




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 12 Apr 2025 11:38:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 07:38:51 2025
Received: from localhost ([127.0.0.1]:54293 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3ZCD-0000Cv-Ge
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 07:38:51 -0400
Received: from forward501b.mail.yandex.net
 ([2a02:6b8:c02:900:1:45:d181:d501]:36772)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dan.list@HIDDEN>)
 id 1u3ZC9-0000Ao-5t
 for 73581 <at> debbugs.gnu.org; Sat, 12 Apr 2025 07:38:47 -0400
Received: from mail-nwsmtp-smtp-production-main-70.sas.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-70.sas.yp-c.yandex.net
 [IPv6:2a02:6b8:c23:2129:0:640:f8ac:0])
 by forward501b.mail.yandex.net (Yandex) with ESMTPS id DF7A8610B9;
 Sat, 12 Apr 2025 14:38:36 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-70.sas.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id YcCKLKILiGk0-DKFuBjpJ; 
 Sat, 12 Apr 2025 14:38:36 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1744457916;
 bh=K3MVf/2n9HZ/Vki6tkgzB3zVtXh3/W1/FU7wFCZoCzU=;
 h=Message-ID:References:Date:Cc:In-Reply-To:Subject:To:From;
 b=kueBsuhZWHFWStn1/3HEfXt5iZVxa//AZNMhg1S8EzRFoY9DWMPMMPYbzzgu2IzG6
 0KMvye6DjyjAVA39/uhloUMNpQ9c+sZ3u++/VntV4jDlGJYZwLt+IUHRNg/KJItuc7
 JK5s22UDY1r+UYppKKYPZ2QnYumQAaiCozmXitWY=
Authentication-Results: mail-nwsmtp-smtp-production-main-70.sas.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <878qo57pnq.fsf@HIDDEN> (Visuwesh's message of "Sat, 12 Apr
 2025 13:54:57 +0530")
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
 <87jz7qv8em.fsf@HIDDEN> <87ecxy6lgf.fsf@HIDDEN>
 <87semdvmje.fsf@HIDDEN> <878qo57pnq.fsf@HIDDEN>
OpenPGP: id=0x964FC110C40AD575;
 url="https://openpgpkey.lispclub.com/.well-known/openpgpkey/lispclub.com/hu/wwhaoe1fy5idwyj4xx847eqerems5rwb?l=dan.list";
 preference=signencrypt
X-Hashcash: 1:28:250412:73581 <at> debbugs.gnu.org::6lTBoAxz/KLAuome:5T6wT
X-Hashcash: 1:28:250412:visuweshm@HIDDEN::r4M4Xz6PepxrNFNq:DqLFq
Date: Sat, 12 Apr 2025 12:38:27 +0100
Message-ID: <87plhha9u4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Visuwesh <visuweshm@HIDDEN> writes:

> [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=8F=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=
=B2=E0=AF=8D 12, 2025] Daniel Cerqueira wrote:
>
>> Visuwesh <visuweshm@HIDDEN> writes:
>>
>>> [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=8F=E0=AE=
=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 11, 2025] Daniel Cerqueira wrote:
>>>
>>>> A bit related:
>>>>
>>>> Can you give an overview how to make search queries with find-grep?
>>>>
>>>> For example, I am trying to make a query with "grep:"happy birthday"
>>>> subject:friend" and it is not working.  Should I prepend a "grep:" aft=
er
>>>> each space (on the search keywords)?
>>>
>>> AFAIU the code, you can't have space in the grep part.  See how
>>> gnus-search parses these "meta keywords" in gnus-search-prepare-query.
>>> Having two grep: selects the last one.  Give the patch below a try, I
>>> don't think it is a good idea to reuse gnus-search-query-next-expr since
>>> it does more than just go over "":
>>>
>>> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
>>> index 41915a0e3c0..7ca67e2134b 100644
>>> --- a/lisp/gnus/gnus-search.el
>>> +++ b/lisp/gnus/gnus-search.el
>>> @@ -2110,20 +2140,28 @@ gnus-search-prepare-query
>>
>> [...]
>>
>> The patch did not work.  I haven't recorded the message error, but it
>> was something to do with the something-generate-artlist having the wrong
>> number of arguments.
>>
>> You don't need to fix it, if you don't want to, have too much work, or
>> don't have time.
>
> I can give a shot at debugging, when I have time, if you provide the
> backtrace.  Getting the find-grep backend to work was a goal for me, you
> gave me a good excuse to procrastinate from working on my thesis.  ;-)

Ahaha!  Now it is giving no error.  But it is also not resulting a
result (from a search query that I know it has matches).

The message that I get is:

Group nnselect:nnselect-87tt6taade.fsf contains no messages

I also have changed this variable:

(set 'gnus-search-default-engines
      '((nnimap . gnus-search-imap)
        (nnmaildir . gnus-search-find-grep)
        (nnselect . gnus-search-nnselect)
        ;; (nnselect . gnus-search-find-grep)
        ))

Maybe this variable is incorrect?  What I want is for the nnmaildir
back-end to use find-grep.

Also, in listing all buffers, I have this variable (which comes from
doing a search): "*gnus-search-" .  It seems to be missing a name in the
end, and also an "*".


>>>> How to search in the subject or by date?
>>>
>>> You can't, the find-grep search backend simply runs grep.  If you don't
>>> want to use mu or notmuch, you could try writing a backend for mblaze.
>>
>> Okay.  Regarding subject, I understand grep not doing it; but regarding
>> time, something can be done with find (it is find-grep after all).  No
>> need or no pressure in doing it, though.
>
> I don't think we can exploit the various time statistics attached with a
> file to achieve what you want.  A message from 2019 reports:
>
>     % stat ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
>       File: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
>       Size: 8420      	Blocks: 24         IO Block: 4096   regular file
>     Device: 8,4	Inode: 5774494     Links: 1
>     Access: (0600/-rw-------)  Uid: ( 1000/     viz)   Gid: ( 1000/     v=
iz)
>     Access: 2025-04-12 13:46:05.575388637 +0530
>     Modify: 2022-01-08 18:13:32.297967005 +0530
>     Change: 2022-06-05 07:44:16.919565297 +0530
>      Birth: 2022-01-08 18:13:32.297967005 +0530
>    % grep ^Date: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:=
2,S
>    Date: Mon, 21 Jan 2019 02:14:48 -0800

What I was thinking is using the arguments of the executable find, such
as atime, ctime, mtime (which one fits best?), when using a query for
time, such as since:3d (I believe the keyword for other queries is
"since:", but I am not sure of this).

> My first impressions of mblaze tells me writing a gnus-search backend
> for it is going to be a formidable task since there's no easy way to
> compose multi-header queries (we can use mpick but I don't think it can
> act on message body text).

I am not willing to install more executables on my system.  That is why
I am wanting to use find-grep.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmf6ULQWHGRhbi5saXN0
QGxpc3BjbHViLmNvbQAKCRCWT8EQxArVdZ16D/wMGA/t1B8S/2X8hDTDbt6ZRmzf
zEzLjwFsmYosOh9tIqJOf2+s27dNkH0wkvTZ3EMwJMNB/g/QIhL5fUaFVq2s5FFe
1z1FCo4F5Y3xrKhL6ZnF4GQvQeLZXIkd6ZQyd5e0IDqRliDZy74gHzMWJNhcZ5Bz
jgSIfqXZgOzqn49Tvh4Era/4kp9VJjC5YywmSzxa+3hziyuwjIhWdhG1OR7hpiIn
ugLb8qSzTn/3TysFw6MwzwqJUPcgaF8a+ZEp32HIGKdlZ2DxuqgpufVTacYpo1h0
T2xt1YlXWd9a0trnpXMMDEeyVPTIgukqMDGqvBtOOg4VXe3K/2WHhLCMklgx3k2g
jNZ++Noy6NjCIjDC/urQ4NfHtCZieFCaFqe2RK0nKy1SfKtXvTjSvaQFfTG8ZdJP
HzqrJKwx76PAfVi983suwYj5azpZTt8stpUGIF0BMbopDRaKIlAuh5BsccSzYWpi
+nQtbioLf9lcLa2qlgCXQyzAKlzswPXV7ecrnD/KDZdqL2fptcTHzKzmzeiu9f7U
5r2gqBh+13usnMW6tUtj/AKyGvqsw1+/KKz/gwn9ZiEOMKf/DAuwnj9HjuutNjAb
n+TsV7lTanxld/QkFuBT2QD3oI/Y5nJZDE3XAV9Vyaguqx8/juY5cqxFE+M6cR6+
NmKMbLLnOzydoRrufg==
=1PzC
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 12 Apr 2025 08:25:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 04:25:11 2025
Received: from localhost ([127.0.0.1]:53815 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3WAp-0003VP-7X
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 04:25:11 -0400
Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:42363)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>)
 id 1u3WAm-0003PU-RW
 for 73581 <at> debbugs.gnu.org; Sat, 12 Apr 2025 04:25:09 -0400
Received: by mail-pg1-x542.google.com with SMTP id
 41be03b00d2f7-af908bb32fdso2497599a12.1
 for <73581 <at> debbugs.gnu.org>; Sat, 12 Apr 2025 01:25:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744446302; x=1745051102; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:user-agent
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=BCRAju4p1+ShsTGWGPi4AfCvHbHeNzQ5D+FevTnUWCc=;
 b=L8fVRedS+qNBtV2+vA5k6gBiF8nlGfROxul5cpXSlJ/1Ayg/Ia1LCZuEM69W+n0jFj
 vgRq9tvQ3DGo1f5bXlekB75J2JYQkrDPqlufjGF5HPxI90lxUmlN646a8NIiPWtmrtB4
 csFf7stJxgDhxtLdgv0VzCROCznh+MqZ/ODYOfeljQ0Hsmu1MD85yXyXcOF8NVv0dhNN
 UAOGnyEf6nbeRZdlVuyMyzrqVAEZhWwpfdrLtShOkPQNrHoMlH+FqwltDJxQen9SI+7l
 fM4R0gPdSKLHpg9nG0Pb47TtEi9A4Skt5/aPtGQyKXs/kUQXnZ/4zSTK5e8ydMxFYR4y
 /faA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744446302; x=1745051102;
 h=content-transfer-encoding:mime-version:message-id:date:user-agent
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=BCRAju4p1+ShsTGWGPi4AfCvHbHeNzQ5D+FevTnUWCc=;
 b=N+BIT8izzSpsQrSBSGh5y9Gr6hOsuqB2WqL0ZwFYbmZodjq90ZAr4g3yQYMOiA+zQL
 qTAcK6H+XVOmaHYilRZ8gXxE7byqNiesu12909WNBe9HYciVCtCXUkupxT4OAnyJRkmq
 hx9RCeYO811o1kmuM6LGVOmLpVtgXEtMia75CCEZ+dvQu1WHvyv1Fu0s1FopF+vLORwH
 uTv8mHY/LIsuVh5hqAOv2gpmj+S6LO8OWUgOItLbn84S9GgiNYUm4TvoQW6TAofsV6BY
 bfrG3sbeFSuVJ0LwoGIUHbBP9s9yhrLVbyHM0rKq2TvD28S8NnEmfdiVDo+RUPX1Ct6G
 29NQ==
X-Gm-Message-State: AOJu0Yw/fF0qDjZSAD2tSwFG3f4yVayhF5j8rbQtyVh3aRUoypoJT3t+
 zdhcOPLratI9le8an1bwH242j3B372qZGIudxrYWz8/OX+Y/HAOo
X-Gm-Gg: ASbGncvIeMgPEZcUTKhYGh6nPBmZJzzBYtoi1MChjDt3jbNkraW+VrrTvArss8dl3JJ
 Gm7sQwUihe6BTMGsvkILOmpJMgmhMRTdgYGPnSvWPvaRc6GVbi0sMGzQ2TzDppQGgVo74AA6nq7
 egF0ZU2VSJv8d167DpRig0SBAE8meAYKdNl/cl4aEPfook9Bu3JxUWcz8sS6CGNikqPF6NTttfa
 NhUpEH97NqYjtWPxAQOrNw4DSesr4E+ybMY46u2EwIrrClBrdBhIE+phe8bRUdNT+nTmimnt3Tp
 RGR0S5DjZvjVb1cvytggTFDSwgaSOt6+GLAzXg==
X-Google-Smtp-Source: AGHT+IEOQFgqPkB+HwEyKr93lqqHgz3D2lyEzIjNlOdun45DNemRoVGJ6CGuK5P5zXB0+HT5BTOqow==
X-Received: by 2002:a17:90b:2586:b0:2ef:ad48:7175 with SMTP id
 98e67ed59e1d1-30784d58c84mr13229742a91.15.1744446302372; 
 Sat, 12 Apr 2025 01:25:02 -0700 (PDT)
Received: from localhost ([115.240.90.130])
 by smtp.gmail.com with UTF8SMTPSA id
 98e67ed59e1d1-306df08f71dsm7066431a91.23.2025.04.12.01.25.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 12 Apr 2025 01:25:01 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Daniel Cerqueira <dan.list@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87semdvmje.fsf@HIDDEN>
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
 <87jz7qv8em.fsf@HIDDEN> <87ecxy6lgf.fsf@HIDDEN>
 <87semdvmje.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
Date: Sat, 12 Apr 2025 13:54:57 +0530
Message-ID: <878qo57pnq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=8F=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=
=E0=AF=8D 12, 2025] Daniel Cerqueira wrote:

> Visuwesh <visuweshm@HIDDEN> writes:
>
>> [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=8F=E0=AE=
=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 11, 2025] Daniel Cerqueira wrote:
>>
>>> A bit related:
>>>
>>> Can you give an overview how to make search queries with find-grep?
>>>
>>> For example, I am trying to make a query with "grep:"happy birthday"
>>> subject:friend" and it is not working.  Should I prepend a "grep:" after
>>> each space (on the search keywords)?
>>
>> AFAIU the code, you can't have space in the grep part.  See how
>> gnus-search parses these "meta keywords" in gnus-search-prepare-query.
>> Having two grep: selects the last one.  Give the patch below a try, I
>> don't think it is a good idea to reuse gnus-search-query-next-expr since
>> it does more than just go over "":
>>
>> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
>> index 41915a0e3c0..7ca67e2134b 100644
>> --- a/lisp/gnus/gnus-search.el
>> +++ b/lisp/gnus/gnus-search.el
>> @@ -2110,20 +2140,28 @@ gnus-search-prepare-query
>
> [...]
>
> The patch did not work.  I haven't recorded the message error, but it
> was something to do with the something-generate-artlist having the wrong
> number of arguments.
>
> You don't need to fix it, if you don't want to, have too much work, or
> don't have time.

I can give a shot at debugging, when I have time, if you provide the
backtrace.  Getting the find-grep backend to work was a goal for me, you
gave me a good excuse to procrastinate from working on my thesis.  ;-)

>>> How to search in the subject or by date?
>>
>> You can't, the find-grep search backend simply runs grep.  If you don't
>> want to use mu or notmuch, you could try writing a backend for mblaze.
>
> Okay.  Regarding subject, I understand grep not doing it; but regarding
> time, something can be done with find (it is find-grep after all).  No
> need or no pressure in doing it, though.

I don't think we can exploit the various time statistics attached with a
file to achieve what you want.  A message from 2019 reports:

    % stat ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
      File: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
      Size: 8420      	Blocks: 24         IO Block: 4096   regular file
    Device: 8,4	Inode: 5774494     Links: 1
    Access: (0600/-rw-------)  Uid: ( 1000/     viz)   Gid: ( 1000/     viz)
    Access: 2025-04-12 13:46:05.575388637 +0530
    Modify: 2022-01-08 18:13:32.297967005 +0530
    Change: 2022-06-05 07:44:16.919565297 +0530
     Birth: 2022-01-08 18:13:32.297967005 +0530
   % grep ^Date: ~/mail/XXX/inbox/cur/1641645812.328064_1.astatine,U=3D1:2,S
   Date: Mon, 21 Jan 2019 02:14:48 -0800

My first impressions of mblaze tells me writing a gnus-search backend
for it is going to be a formidable task since there's no easy way to
compose multi-header queries (we can use mpick but I don't think it can
act on message body text).




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 12 Apr 2025 07:58:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 03:58:51 2025
Received: from localhost ([127.0.0.1]:53720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3VlL-00024b-Go
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 03:58:51 -0400
Received: from forward501b.mail.yandex.net ([178.154.239.145]:43698)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dan.list@HIDDEN>)
 id 1u3VlH-000243-P9
 for 73581 <at> debbugs.gnu.org; Sat, 12 Apr 2025 03:58:49 -0400
Received: from mail-nwsmtp-smtp-production-main-55.sas.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-55.sas.yp-c.yandex.net
 [IPv6:2a02:6b8:c23:2db2:0:640:9334:0])
 by forward501b.mail.yandex.net (Yandex) with ESMTPS id E1ED6611A4;
 Sat, 12 Apr 2025 10:58:38 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-55.sas.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id aw8Fi2GLfqM0-Ogay8ZYt; 
 Sat, 12 Apr 2025 10:58:38 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1744444718;
 bh=/nvbRWyip/EUb+3C/j9VIUD6O+IeM6uAD5axch0LlNE=;
 h=Message-ID:References:Date:Cc:In-Reply-To:Subject:To:From;
 b=OuDDYxt/3zTePagji3Etkp/BgzNnd7gYKhM4hS2TxFDmFUpV8LJ9mmxy6yKx/xjo9
 NfXIFnW5C6klAZppqRA/XU5PFLa+MBqJkaIi4eCnOxvS/Kcpxj2QAtsdAH8rj2003f
 2MQi5ABYlJYgwZml4m9vD0ZX7KPKuM5QiCj3xOho=
Authentication-Results: mail-nwsmtp-smtp-production-main-55.sas.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87ecxy6lgf.fsf@HIDDEN> (Visuwesh's message of "Sat, 12 Apr
 2025 10:11:04 +0530")
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
 <87jz7qv8em.fsf@HIDDEN> <87ecxy6lgf.fsf@HIDDEN>
OpenPGP: id=0x964FC110C40AD575;
 url="https://openpgpkey.lispclub.com/.well-known/openpgpkey/lispclub.com/hu/wwhaoe1fy5idwyj4xx847eqerems5rwb?l=dan.list";
 preference=signencrypt
X-Hashcash: 1:28:250412:visuweshm@HIDDEN::ZAjgUknX6o7Ky7w7:6L4Ar
X-Hashcash: 1:28:250412:73581 <at> debbugs.gnu.org::SOVsFOn3lr+eb5U1:7y+VR
Date: Sat, 12 Apr 2025 08:58:29 +0100
Message-ID: <87semdvmje.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Visuwesh <visuweshm@HIDDEN> writes:

> [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=8F=E0=AE=
=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 11, 2025] Daniel Cerqueira wrote:
>
>> A bit related:
>>
>> Can you give an overview how to make search queries with find-grep?
>>
>> For example, I am trying to make a query with "grep:"happy birthday"
>> subject:friend" and it is not working.  Should I prepend a "grep:" after
>> each space (on the search keywords)?
>
> AFAIU the code, you can't have space in the grep part.  See how
> gnus-search parses these "meta keywords" in gnus-search-prepare-query.
> Having two grep: selects the last one.  Give the patch below a try, I
> don't think it is a good idea to reuse gnus-search-query-next-expr since
> it does more than just go over "":
>
> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
> index 41915a0e3c0..7ca67e2134b 100644
> --- a/lisp/gnus/gnus-search.el
> +++ b/lisp/gnus/gnus-search.el
> @@ -2110,20 +2140,28 @@ gnus-search-prepare-query

[...]

The patch did not work.  I haven't recorded the message error, but it
was something to do with the something-generate-artlist having the wrong
number of arguments.

You don't need to fix it, if you don't want to, have too much work, or
don't have time.


>> How to search in the subject or by date?
>
> You can't, the find-grep search backend simply runs grep.  If you don't
> want to use mu or notmuch, you could try writing a backend for mblaze.

Okay.  Regarding subject, I understand grep not doing it; but regarding
time, something can be done with find (it is find-grep after all).  No
need or no pressure in doing it, though.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmf6HSYWHGRhbi5saXN0
QGxpc3BjbHViLmNvbQAKCRCWT8EQxArVdfqwD/0WRPt4mOCWiyBZ9ozi3k4GPuT7
yz40KPZPfyxbCpA3xq/nk5nTrmUO6MNn1T39DqNib0XVzL5RuVtR5NuvNWRtDvDp
b1klO3ZuNBx6qVPl/ucvdA0OgqlhJze1dWQo7tSnwRrMaxVUDdghrm0Fu6si8Cc8
AH9bylhKuwaEVg+z1h5RVOtXwaQcXPZayG7FJFDagoucnxrlWr9HhlEbrP5ITnID
Nbn5GvAbUh+qnzIk8HKFDMKmM515neRjpj2QUAxDdJTK7vs6sywXF19h2PbAQe2J
tZgKHi+CYpehl6FSywkDrWTGQTKLFy5SiPrt54kzjvFqpmiZl6c6YknFXI5MvIpl
XGbBkFr8y6FPzjjDMN4SwMB8jDidJ1ZB6zyzzgy/UURKGZtmFnxdfUg+4hr3/duq
2Cj4PClk6fStIT/ezLDHqCj9QxC6MdsGh/p+A2SbGoOchR4Eey8TqpW6LJmiLal5
L0RpAdH7fobJLUUHc9QlICjqK8oOd+esBogqAVKghnwC+FqpnA+W2ZajJbV7FQxm
90HffQ53dCdfIwaePXveAn5PyjRPTZfw6w4W5Grsys2qo2v2hxmP6M7MJlT5oPl9
EYq9gZmb1f5RP7ag6z8Sja8MYpcZlC7GN/8KcgI6zsUW5HHC+xAIzz3popwi/1am
juadU/lYV3zuXp+4lA==
=7mzk
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 12 Apr 2025 04:41:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 12 00:41:20 2025
Received: from localhost ([127.0.0.1]:53044 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3SgA-00045q-HK
	for submit <at> debbugs.gnu.org; Sat, 12 Apr 2025 00:41:20 -0400
Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:61839)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>)
 id 1u3Sg7-00045J-8y
 for 73581 <at> debbugs.gnu.org; Sat, 12 Apr 2025 00:41:15 -0400
Received: by mail-pf1-x443.google.com with SMTP id
 d2e1a72fcca58-73972a54919so2454205b3a.3
 for <73581 <at> debbugs.gnu.org>; Fri, 11 Apr 2025 21:41:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744432869; x=1745037669; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=XoaBoCiCim28DrPiMQUXPcp/JfCHrIDQKsE+QAl2V0I=;
 b=h0sZmf0VhRPSCQ4owaTuW0PISasyZ2FUIRFywwikWQsRuqnHbyGnKxArtlCb42/JBC
 Av3ZMGaFAGO3wwELYhFJU3dS5xYWx0I+Ved31jO0ka+Vk2t9L4EIFXS+4vPcYlN8kzsB
 P27dKPGo1ja50IrwF416VLNDtH2HcxM7jKZMinAIYWmOY4IBJ3SdkAsv0RCQE2R2yt/5
 A/8gK8NS66yOg7QLc+Yo4CcJqMZQVtkQqPA2zZTCL2NGricxOw2zLicq9ogeQ7ORFAcq
 LMPtwZZZESiUGrXMQj1BnDZTUnqJ3+EJEhFdcqag97v04Y3PAJmRDFXvZUgccnDiGOIO
 kJZw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744432869; x=1745037669;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=XoaBoCiCim28DrPiMQUXPcp/JfCHrIDQKsE+QAl2V0I=;
 b=K8FFBMGalXl1PfsjcehT81NsBsCp9v+nZXQrbhwTX0mSJRqHwv2Z9fuO35GKEZYNp3
 uIEk2CZ9u+xA7zMqorwhHVlh5wYgrFeeT+Z+8mNR3qH9FV60/2Ml+1BDgwl8M2UAaQbH
 6PDSoc7razHVwOv7/ai5pFIUoAa/06f+NXr0k7ZsgSe2B+x87d6uGy8bSOq31s/Rv9Yw
 d6tJNEWfh6arOWqw5H6P5rRqfoP/fDnErRlNelP9s2uvxWTi3PjV0YjG5rp7cSW8t1bQ
 dEefMM6W5bIjOb7vg1bwXG+j1Xr7KMTMrek1eiDgvtjc05R6MT/b5U2MiNhDk1DUL963
 1+Ag==
X-Gm-Message-State: AOJu0Ywl4OJ63HwSPF8BhvDo8EmlfoD/lsuRi0qvjIlbyVaQ0y1dI1GQ
 J7L1CaRBp6WJNHFYcbMj3qSbnd128LlQobJqyH54G/yjSgSo5u8q
X-Gm-Gg: ASbGncuUwDfEK10RvDnKjLNtk3CtupAa23uI3Jlw63boABaQFy0vOmgM11w7/bcU33h
 TN1cAa92PL+lW0+4rCVCazt4GyO+uWoivDMSEvJgtoLbjVkKob2C+TuRc5aGG841guKyP1EsdQ7
 phVf8Cvmha2dB1IhoIioCokBVPfvuDwMUuEj0NjFMOHIOj1DiD83xKyJpCxn7nttpswtytAlt8f
 7hVWaHqnkWvLmE6oU9fQ4RhUedY89VKVgvXpeCWufrqRpu4ongf/iLDiPdNEtnzST/u0YXUVDZQ
 gLy79VOpAJli/fMCr/KblTCkQ+as88fOa0rXM9RAbA==
X-Google-Smtp-Source: AGHT+IE82/1blG7MhVni6aLqTkZhus9afADIim9cEMxacke4fprbsZDdI94sRFtz4LnSwPQzK/SPYQ==
X-Received: by 2002:aa7:88cc:0:b0:736:532b:7c10 with SMTP id
 d2e1a72fcca58-73bd12a2c07mr6725888b3a.21.1744432868633; 
 Fri, 11 Apr 2025 21:41:08 -0700 (PDT)
Received: from localhost ([1.7.159.71]) by smtp.gmail.com with UTF8SMTPSA id
 d2e1a72fcca58-73bd2198e9csm2563734b3a.28.2025.04.11.21.41.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 11 Apr 2025 21:41:08 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Daniel Cerqueira <dan.list@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87jz7qv8em.fsf@HIDDEN>
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
 <87jz7qv8em.fsf@HIDDEN>
Date: Sat, 12 Apr 2025 10:11:04 +0530
Message-ID: <87ecxy6lgf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 3.6 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [வெள்ளி ஏப்ரல் 11, 2025] Daniel Cerqueira
    wrote: > A bit related: > > Can you give an overview how to make search queries
    with find-grep? > > For example, I am trying to make a query with "grep:"happy
    birthday" > subject:friend" and it is not workin [...] 
 
 Content analysis details:   (3.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [1.7.159.71 listed in zen.spamhaus.org]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2607:f8b0:4864:20:0:0:0:443 listed in]
                             [list.dnswl.org]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (visuweshm[at]gmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.6 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [வெள்ளி ஏப்ரல் 11, 2025] Daniel Cerqueira
    wrote: > A bit related: > > Can you give an overview how to make search queries
    with find-grep? > > For example, I am trying to make a query with "grep:"happy
    birthday" > subject:friend" and it is not workin [...] 
 
 Content analysis details:   (2.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2607:f8b0:4864:20:0:0:0:443 listed in]
                             [list.dnswl.org]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [1.7.159.71 listed in zen.spamhaus.org]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (visuweshm[at]gmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

[=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=8F=E0=AE=AA=
=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 11, 2025] Daniel Cerqueira wrote:

> A bit related:
>
> Can you give an overview how to make search queries with find-grep?
>
> For example, I am trying to make a query with "grep:"happy birthday"
> subject:friend" and it is not working.  Should I prepend a "grep:" after
> each space (on the search keywords)?

AFAIU the code, you can't have space in the grep part.  See how
gnus-search parses these "meta keywords" in gnus-search-prepare-query.
Having two grep: selects the last one.  Give the patch below a try, I
don't think it is a good idea to reuse gnus-search-query-next-expr since
it does more than just go over "":

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 41915a0e3c0..7ca67e2134b 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -2110,20 +2140,28 @@ gnus-search-prepare-query
 	val)
     (when (stringp query)
       ;; Look for these meta keys:
-      (while (string-match
-	      "\\(thread\\|grep\\|limit\\|raw\\):\\([^ ]+\\)"
-	      query)
-	(setq val (match-string 2 query))
-	(setf (alist-get (intern (match-string 1 query)) query-spec)
-	      ;; This is stupid.
-	      (cond
-	       ((equal val "t"))
-	       ((null (zerop (string-to-number val)))
-		(string-to-number val))
-	       (t val)))
-	(setq query
-	      (string-trim (replace-match "" t t query 0)))
-	(setf (alist-get 'query query-spec) query)))
+      (with-temp-buffer
+        (insert query)
+        (goto-char (point-min))
+        (while (re-search-forward "\\(thread\\|grep\\|limit\\|raw\\):" nil=
 t)
+          (setq val (cons
+                     (match-string 1)
+                     (buffer-substring (point)
+                                       (if (eq (char-after) ?\")
+                                           (progn (forward-sexp) (point))
+                                         (progn (forward-whitespace) (1- (=
point)))))))
+          (setf (alist-get (intern (car val)) query-spec)
+                ;; This is stupid.
+                (cond
+	         ((equal (cdr val) "t"))
+	         ((null (zerop (string-to-number (cdr val))))
+		  (string-to-number (cdr val)))
+	         (t (string-trim (cdr val) "\"" "\""))))
+          (setq query (string-trim (string-replace
+                                    (concat (car val) ":" (cdr val))
+                                    ""
+                                    query)))
+          (setf (alist-get 'query query-spec) query))))
     (when (and gnus-search-use-parsed-queries
 	       (null (alist-get 'raw query-spec)))
       (setf (alist-get 'parsed-query query-spec)

> How to search in the subject or by date?

You can't, the find-grep search backend simply runs grep.  If you don't
want to use mu or notmuch, you could try writing a backend for mblaze.




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 11 Apr 2025 18:51:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 11 14:51:50 2025
Received: from localhost ([127.0.0.1]:51753 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3JTi-0002rR-2z
	for submit <at> debbugs.gnu.org; Fri, 11 Apr 2025 14:51:50 -0400
Received: from forward502d.mail.yandex.net ([178.154.239.210]:48156)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dan.list@HIDDEN>)
 id 1u3JTf-0002r7-Be
 for 73581 <at> debbugs.gnu.org; Fri, 11 Apr 2025 14:51:48 -0400
Received: from mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c42:8741:0:640:b274:0])
 by forward502d.mail.yandex.net (Yandex) with ESMTPS id 1F6E66119C;
 Fri, 11 Apr 2025 21:51:39 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id bplpIC7LdSw0-MF7uh7PH; 
 Fri, 11 Apr 2025 21:51:38 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1744397498;
 bh=YzUCSHm4HRnvLoYvcsudPPH+CxJ8/fyON/K5Q0d5sL4=;
 h=Message-ID:References:Date:Cc:In-Reply-To:Subject:To:From;
 b=lLpNHX63RtLz2yzU9C3QRkOC4xWUBZVbWQSBJXskYcFKOYGfFTKImKLUYEGztblCa
 ti7gGJD3KhV/LwTQLS2OJ8NYjkm//cJGfk5sk2BtojErYE6Yu1OobD6RSiKuohMMaK
 imYVz5nQKLD3IFSduEAOeI6+M0qCcBdDBCAErpLA=
Authentication-Results: mail-nwsmtp-smtp-production-main-84.klg.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87friey90n.fsf@HIDDEN> (Daniel Cerqueira's message of
 "Fri, 11 Apr 2025 17:10:00 +0100")
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN> <87friey90n.fsf@HIDDEN>
OpenPGP: id=0x964FC110C40AD575;
 url="https://openpgpkey.lispclub.com/.well-known/openpgpkey/lispclub.com/hu/wwhaoe1fy5idwyj4xx847eqerems5rwb?l=dan.list";
 preference=signencrypt
X-Hashcash: 1:28:250411:visuweshm@HIDDEN::BQzO6EvBcwGue6CK:TczNP
X-Hashcash: 1:28:250411:73581 <at> debbugs.gnu.org::Yuvol0+cLEzJUnm9:ZfxIa
Date: Fri, 11 Apr 2025 19:51:29 +0100
Message-ID: <87jz7qv8em.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

A bit related:

Can you give an overview how to make search queries with find-grep?

For example, I am trying to make a query with "grep:"happy birthday"
subject:friend" and it is not working.  Should I prepend a "grep:" after
each space (on the search keywords)?  How to search in the subject or by
date?

Cheers.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmf5ZLIWHGRhbi5saXN0
QGxpc3BjbHViLmNvbQAKCRCWT8EQxArVdV4TEACZ/2PCPw6gzENdsgwSJJ8fP28M
VOrlLIKDGvn1PTLMtkC7q3QxBZ+lRMhZr+tD9Wv+wgdEcqDuODojr/eQV84shWCd
9yukmD2hsI1FyA+8tuXDggzzjuHixMzoHPaIjuybBPuN4G0+GKbObpuXotGOlRy5
bpiNNAn2LHS3/xzBNn/xumxlvG6SIBhPHk6EE1HnR834Ysdk8mDr5lG3nmp3nV3v
gQpvHzmt9DHh2DKj+h24owHS2rrvX6qSpuDVfwJ9Mu3AnjFkQIH/WiU2jiMPkFgK
csqjjJ9ZegDS9mIQrFspFvud0GKsDmGJh8RyuRrNd0CWgjU42MpVkJ9r85MXOTD3
kvka3I9cagQm+PENab+Pu1V41Udx+4/aaibtclpv0o6JiWWpj91yBgDBeCu3T+db
geqYlfi2aRGDZYMfuQWzq8YvCpZrYbA1mn/4lQgukPFoCSKr+ubpW+8Tw+9WxeMD
HXpmVlPR+yP60hBW/eL+zuMx7Yn2a+OSfRzJyr23JxnVtzGZirGDVNq40ZkYSJIG
Zkz2larygsMjtMz92pcng1BFoedd3oLgDM9Bi31P9D2ExCzplmUk57hi3+RNjSiF
Gyjv7b0miD5ZR1jEiCPMCLHVYNL09kCr3BiVVh9kDMyP6erd5L4mmcgiSn+unMo2
8540qVS6L6trv7D01w==
=bXOm
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 11 Apr 2025 16:10:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 11 12:10:21 2025
Received: from localhost ([127.0.0.1]:51442 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u3GxR-0000Q3-2y
	for submit <at> debbugs.gnu.org; Fri, 11 Apr 2025 12:10:21 -0400
Received: from forward500d.mail.yandex.net
 ([2a02:6b8:c41:1300:1:45:d181:d500]:49046)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dan.list@HIDDEN>)
 id 1u3GxN-0000Oy-It
 for 73581 <at> debbugs.gnu.org; Fri, 11 Apr 2025 12:10:18 -0400
Received: from mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c42:3d4b:0:640:d84f:0])
 by forward500d.mail.yandex.net (Yandex) with ESMTPS id 9B2AF6131B;
 Fri, 11 Apr 2025 19:10:09 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id 7AjPHv5LiKo0-vLiMmm9p; 
 Fri, 11 Apr 2025 19:10:09 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1744387809;
 bh=LoF8MTvLi7KgKDVQJa7baGmb1pDWp2vFw+FU8t96/d4=;
 h=Message-ID:References:Date:Cc:In-Reply-To:Subject:To:From;
 b=pXnZVE49RxtpHkyv4aeMAUm4RldIMNKJbsG+Qc3loTh3b55qddJjofdLsQQmnxFMg
 dmDC0d2JZcOiaKA4mo6vbxxmN9/iureR9cRIKCAycU3DDYE9nUGqzhNFybzwFMAHgL
 qpHEhvYt8Y68OB6KhY1ZE8sj04yPQUOV8V59O3Zs=
Authentication-Results: mail-nwsmtp-smtp-production-main-72.klg.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: Visuwesh <visuweshm@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87a58o9mch.fsf@HIDDEN> (Visuwesh's message of "Thu, 10 Apr
 2025 18:59:02 +0530")
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
 <87a58o9mch.fsf@HIDDEN>
OpenPGP: id=0x964FC110C40AD575;
 url="https://openpgpkey.lispclub.com/.well-known/openpgpkey/lispclub.com/hu/wwhaoe1fy5idwyj4xx847eqerems5rwb?l=dan.list";
 preference=signencrypt
X-Hashcash: 1:28:250411:73581 <at> debbugs.gnu.org::FesrgSLWhwVgwhFX:MCyD
X-Hashcash: 1:28:250411:visuweshm@HIDDEN::8BcyV5P9OKrPuCpu:NlANQ
Date: Fri, 11 Apr 2025 17:10:00 +0100
Message-ID: <87friey90n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Visuwesh <visuweshm@HIDDEN> writes:

> [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=
=8F=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 10, 2025] Visuwesh wrote:
>
>> With all that accounted for, I ended up with the (ugly?) patch below.
>
> Here's a slightly better patch which directly edits the buffer text
> instead of working with strings.
>
> diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
> index 41915a0e3c0..1f66225318c 100644
> --- a/lisp/gnus/gnus-search.el
> +++ b/lisp/gnus/gnus-search.el

[...]

This makes me happy! Thank you Visuwesh!  It does work! :-) .


--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmf5PtgWHGRhbi5saXN0
QGxpc3BjbHViLmNvbQAKCRCWT8EQxArVdR7wD/42EVyzK1PIbuNftlUkNAtFR/Ux
n1xPBhHU3u/rq1hsqUEC3OqkG8VGDMknn+RicyuIvsbWdYJChPca9ZxGXVZWTJq/
UflfbD8yOpuzeTmYHnRs2LEZQWTg10VLqp7J+P1du4FlQZG4pBKPN4rIiFwEMinl
8dmsC+lET/okFS1HiHlzC6DYfPq0bk7ibqsV32aN3yd2TWuLnMPL0EY87vRK539T
R6i24HsGpoc+mYWzbdtSYEBTGyqhF0FoK4PfkKT7a0faf3olJBQHTRDFT594UcWm
9TF7CoDDFlSw30TScC1D3lpuLvV2/mk/AoTacdDORyh7gwWYVK2rZ/6ra2JDzR14
nl/OV4lYIgeyACBigQzlUZPNQ4JJrRcOIRu/Bh9aPKD+mm7zlHsglpMJuOlPQSzy
O0gOhX2atGWkHVNGYroG9G1Mr2CGHI219fjRGwaSboguqL2/iy/w8OHq8zGgZwTC
o/e5ydBQZvhM/MAUnd4mhLkY8FX2J7WQevFuw0UhdwHAupP1ka5boYTXni9sC6ja
40mI0RKlknFfxD5ptG/ze7fbkNcaa/oZtpCWdjZX/AKSJ927quV3SpSZOtW+K8MD
SdSv+jF94N40ynHX+Ad6XKhzk6Fo8UmSWGC0Tw0d+wKKy1Y0IwM68TElNR+sGS0h
MFJStsQqLgFNfsMiBg==
=SMk4
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 10 Apr 2025 13:29:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 10 09:29:16 2025
Received: from localhost ([127.0.0.1]:44441 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2rxz-0005AS-EL
	for submit <at> debbugs.gnu.org; Thu, 10 Apr 2025 09:29:15 -0400
Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:44177)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>)
 id 1u2rxw-0005AB-Jh
 for 73581 <at> debbugs.gnu.org; Thu, 10 Apr 2025 09:29:13 -0400
Received: by mail-pl1-x641.google.com with SMTP id
 d9443c01a7336-2255003f4c6so8251625ad.0
 for <73581 <at> debbugs.gnu.org>; Thu, 10 Apr 2025 06:29:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744291746; x=1744896546; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=YEbUzdt5q7pGRpZtVnMBUfAzWdbQKhs3storLlpua78=;
 b=YhvAs0OmzUNPeT/NKVrD1gWLbNy0GOSPjbzHzYDTWhcPiZG/WoQWMsY1TimxLIUfb2
 P5plBmv0tU2/gLgueqUP7HUulv2ImwPsuZdWyfB0ltykisSlrEgcwjPeRPFlFBAVEmAW
 9QJ5biO94S9198dz1B8u3VtVvIP+d7+cg8CjKt0Gj5GvoNxNmqvp0SymCJCh5j/5782t
 SvqlP6vPb4wfnQwzVz0zOyM6qdXC5n+vboOaWgrMtpNUDvXITSCb3NO5zOhD4Pi76kwP
 BjMWeIJFfVzusoPOc3nRFHyYril9q3CS+NzW+jPIXPS0k2KX2NcFFbDWVRxgAL8FcBG3
 80RA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744291746; x=1744896546;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=YEbUzdt5q7pGRpZtVnMBUfAzWdbQKhs3storLlpua78=;
 b=XKzQ9GR0dsBYRNqPeaj7dIpPST1FvjQ/1+7eimc9v9xiTKqdJB5vCgkrjEogk2kzRt
 L/DjaYC2hFDW82nSUfWU6Tt05Ch9Ag9GpO9ajdmBbItgS30RLc5V+gHaQv/tVfY9Ms7G
 sMT6Y6sclkTqarVDkJEv/e+jcylQ2DM/PCpbAtFR90xJBVU+/0FTg9otAWCUqCzFEdNh
 ZQHyOXEXNChb+dO3u08TGW0tDs57O+JMC7IIRZL68/P6N9K7tWAhBdd/UFw/c+e7zkOi
 DsRfFHdl1jWqAR5aLBcu9AMzlHitq0AGVmfgTIcrW8FUL35cbUs66y94dSO07prEHNGK
 W0Kw==
X-Gm-Message-State: AOJu0YzkIypiiYlcTsjwieBfSmEJFtFOm5FH4M/iySfPeY01MmZfDmOo
 8+6iTFnaJNj30B1+Oe6KITF+UmBf122GzOWddtTudr3fem8Z+Nq9
X-Gm-Gg: ASbGncs1A3SWa5qRQA9/cwHDhd9jlpUIQtwkCw9htBbtCYhkJ9HQmgy5Nw/1MBiAMgf
 sT49E1Bl+VeSJf4uzrlmZ+hNDuyZkzKDmtxoWQ15grahaVKNb9ShX4flyB3cTG8lahMC0LXT5H1
 0/TQxgxRP+nE5l/XhxHqcom9nxuD9c/jnBxatebrGXbds+t0HQKvqBYLfPoKF4MqE5gbteMe2oi
 qYF5qKFOo3H8hGChblRtLDMmvoPwMhjsDfqfWkKYeWhVbGm78kbPFiLN1iEvjbzGRlpGZQEkKdv
 ESdzGIFPCyqCH0TyjpGgjIw/DAsm9XWQvGInf0k+ts4R/RBJixw+
X-Google-Smtp-Source: AGHT+IGlcLyFAfg1iA/A9mbD81ON1Dvf3wE7SnAYKPViPCbjxRgSdbM2wNlBInFD3BESDRRLMq4lnA==
X-Received: by 2002:a17:902:ec81:b0:220:eade:d77e with SMTP id
 d9443c01a7336-22b42c2cebcmr54621465ad.40.1744291746094; 
 Thu, 10 Apr 2025 06:29:06 -0700 (PDT)
Received: from localhost ([1.7.159.71]) by smtp.gmail.com with UTF8SMTPSA id
 d2e1a72fcca58-73bb1d2afa9sm3215186b3a.22.2025.04.10.06.29.04
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 10 Apr 2025 06:29:05 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Daniel Cerqueira <dan.list@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87lds89od0.fsf@HIDDEN>
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN> <87lds89od0.fsf@HIDDEN>
Date: Thu, 10 Apr 2025 18:59:02 +0530
Message-ID: <87a58o9mch.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 3.6 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [வியாழன் ஏப்ரல் 10, 2025] Visuwesh
    wrote: > With all that accounted for, I ended up with the (ugly?) patch below.
    Here's a slightly better patch which directly edits the buffer text instead
    of working with strings. 
 
 Content analysis details:   (3.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (visuweshm[at]gmail.com)
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [1.7.159.71 listed in zen.spamhaus.org]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2607:f8b0:4864:20:0:0:0:641 listed in]
                             [list.dnswl.org]
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.6 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [வியாழன் ஏப்ரல் 10, 2025] Visuwesh
    wrote: > With all that accounted for, I ended up with the (ugly?) patch below.
    Here's a slightly better patch which directly edits the buffer text instead
    of working with strings. 
 
 Content analysis details:   (2.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [1.7.159.71 listed in zen.spamhaus.org]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2607:f8b0:4864:20:0:0:0:641 listed in]
                             [list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (visuweshm[at]gmail.com)
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

[=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=8F=
=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 10, 2025] Visuwesh wrote:

> With all that accounted for, I ended up with the (ugly?) patch below.

Here's a slightly better patch which directly edits the buffer text
instead of working with strings.

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 41915a0e3c0..1f66225318c 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1980,8 +1980,11 @@ gnus-search-run-search
 				      &optional groups)
   "Run find and grep to obtain matching articles."
   (let* ((method (gnus-server-to-method server))
-	 (sym (intern
-	       (concat (symbol-name (car method)) "-directory")))
+         ;; `nnmaildir' backends use the 'directory' setting.
+	 (sym (if (eq (car method) 'nnmaildir)
+                  'directory
+                (intern
+	         (concat (symbol-name (car method)) "-directory"))))
 	 (directory (cadr (assoc sym (cddr method))))
 	 (regexp (alist-get 'grep query))
 	 (grep-options (slot-value engine 'grep-options))
@@ -1996,6 +1999,12 @@ gnus-search-run-search
      #'vconcat
      (mapcar (lambda (x)
 	       (let ((group x)
+                     (nnmaildir-strip-regexp
+                      ;; TODO: Does it need the ^ anchor?
+                      (concat (regexp-quote (gnus-group-real-name x))
+                              "/\\(?:new\\|cur\\)/"))
+                     (nnmaildir-strip-repl
+                      (concat (gnus-group-real-name x) "/"))
 		     artlist)
 		 (gnus-message 7 "Searching %s using find-grep..."
 			       (or group server))
@@ -2003,7 +2012,7 @@ gnus-search-run-search
 		   (set-buffer buffer)
 		   (if (> gnus-verbose 6)
 		       (pop-to-buffer (current-buffer)))
-		   (cd directory)    ; Using relative paths simplifies
+		   (cd directory)      ; Using relative paths simplifies
 					; postprocessing.
 		   (let ((group
 			  (if (not group)
@@ -2029,28 +2038,49 @@ gnus-search-run-search
 		     (save-excursion
 		       (apply
 			#'call-process "find" nil t
-			"find" group "-maxdepth" "1" "-type" "f"
-			"-name" "[0-9]*" "-exec"
-			(slot-value engine 'grep-program)
-			`("-l" ,@(and grep-options
-				      (split-string grep-options "\\s-" t))
-			  "-e" ,regexp "{}" "+"))))
-
+			"find"
+                        (delq
+                         nil   ; nil can be present if GREP-OPTIONS=3Dnil.
+                         `(,@(if (eq (car method) 'nnmaildir)
+                                 (list (concat group "/cur")
+                                       (concat group "/new"))
+                               group)
+                           "-maxdepth" "1" "-type" "f"
+			   "-name" "[0-9]*" "-exec"
+			   ,(slot-value engine 'grep-program)
+			   "-l" ,@(and grep-options
+				       (split-string grep-options "\\s-" t))
+			   "-e" ,regexp "{}" "+")))))
+
+                   ;; When searching in a maildir directory, change the
+                   ;; filenames to not have cur and new.
+                   (when (eq (car method) 'nnmaildir)
+                     (save-excursion
+                       (while (re-search-forward nnmaildir-strip-regexp ni=
l t)
+                         (replace-match nnmaildir-strip-repl t))))
 		   ;; Translate relative paths to group names.
 		   (while (not (eobp))
-		     (let* ((path (split-string
-				   (buffer-substring
-				    (point)
-				    (line-end-position))
-				   "/" t))
-			    (art (string-to-number (car (last path)))))
+		     (let* ((path (split-string (buffer-substring
+				                 (point)
+				                 (line-end-position))
+                                                "/" t))
+			    (art (car (last path))))
 		       (while (string=3D "." (car path))
 			 (setq path (cdr path)))
 		       (let ((group (mapconcat #'identity
 					       (cl-subseq path 0 -1)
 					       ".")))
 			 (push
-			  (vector (gnus-group-full-name group server) art 0)
+			  (vector (gnus-group-full-name group server)
+                                  ;; FIXME: Code duplication.  This is
+                                  ;; copied over from
+                                  ;; `gnus-search-indexed-parse-output'.
+                                  (if (string-match-p "\\`[[:digit:]]+\\'"=
 art)
+		                      (string-to-number art)
+		                    (nnmaildir-base-name-to-article-number
+		                     (substring art 0 (string-search ":" art))
+		                     group (string-remove-prefix "nnmaildir:" server)))
+                                  0)
 			  artlist))
 		       (forward-line 1)))
 		   (gnus-message 7 "Searching %s using find-grep...done"




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 10 Apr 2025 13:19:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 10 09:19:50 2025
Received: from localhost ([127.0.0.1]:44381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2ros-0004Jj-EH
	for submit <at> debbugs.gnu.org; Thu, 10 Apr 2025 09:19:50 -0400
Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:47577)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <visuweshm@HIDDEN>)
 id 1u2roq-0004JU-GK
 for 73581 <at> debbugs.gnu.org; Thu, 10 Apr 2025 09:19:49 -0400
Received: by mail-pl1-x643.google.com with SMTP id
 d9443c01a7336-224341bbc1dso6442435ad.3
 for <73581 <at> debbugs.gnu.org>; Thu, 10 Apr 2025 06:19:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744291182; x=1744895982; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:references
 :message-id:date:in-reply-to:subject:cc:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=l/aQhfmMaAzXucHsFRfka8hXruPmTyvaF1fjgeoiios=;
 b=cLJbUc+1bhyeyyZDFwB7yOoRfvXvMbj/M+x0IIMbm2FhmR9H73z0qnJbXUTJC1xTvY
 KhGCJVXGCpUR02l+cIR9OyF1gF8hyjIyqtI60IT+MGMkBIVbsM1AuKP/4zhTB9xGE0G6
 S9ihQfFaSqcCGlha06ijjpvKneD5pIP2RsSqjTX+ctfkBpY4VapFCk8HsLxggo3Xhri2
 3BTIi4SRS8W8G9ByjMKDGexEbpZmjFF9pmMXGPAfIPtmVw8vzOYk3zV7x3I/Tk/rhTc6
 ZlB3D5IpptL/CB6RgJtzskcSEQtJR1CupJhaGeDc2kW+7LsCqYrJxgZOBEXSjkgEx6ib
 Hwkw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744291182; x=1744895982;
 h=content-transfer-encoding:mime-version:user-agent:references
 :message-id:date:in-reply-to:subject:cc:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=l/aQhfmMaAzXucHsFRfka8hXruPmTyvaF1fjgeoiios=;
 b=nNnFnjp3JvMODCCsg3FcmJC7ZDrNWBQCDIKCrn+BnOXDwSHn9d8lqR2boC7fRUfcS0
 fcel6KpcpF8AlndUT/5EwEcrjIwBSKV7Z56cPrRgArFQRtTq54eybfMqlOJ8bRszYsWH
 wHBOx9QXzPZe6uGwO4QeeDMihUMAF07KqkHRmIJlsKpdZZ20x1PX5qSx1vEztGycqUY0
 ihAqSQczxai25EcdrMxhn4TmRdnGR0XIxud7jRZEaURtOB1GPxs08QWHopsZj4NPNMtF
 D7JhRVb0qSS8NYvT0DrzItiJTtmMs7Tvi7MUcJ3OLBRREFUOq86EQJCxd7GFpRxe0nSv
 Usww==
X-Gm-Message-State: AOJu0YwMKGFnPGqJTvSrLj9HpLbUxW9fvQ967BJiddBV/tG01WoXwH2U
 gINCB6GbEt4BYxqIsTLWq4Tdn5FBS4PU4Z1ZUqhiO96faX4iosuG
X-Gm-Gg: ASbGncspfaIJ+gcLt60qZtnxqISZfYQtC8MjqX3PfD/IKT0njiXoHiDEbi38Hiuw1fU
 f7kQ8H6hdnIt2ofcsZmBCnjmVJz5fAQYnMFiw3pfBh/uWxzTZ+mCq2CVpEW7jtzbDT2yMHSmLD0
 GPuQXlW0+JAEpMudpPP93KnRgeK4XosEZYUap9fJzBMfmxFcFv1/Hi6c7vOrRBHBLlkvYCpXHyN
 lQL2kXSAi8OsJh2ul8YDLWOTgTosKMBvBuXe9LC6h6xJwElvH5cMvQEqn7SnbPrNZAdc4AI2Kn5
 L/qRXvkuaYgM9jSuvE5pArxN10X6IqdAPDk/W0PVog==
X-Google-Smtp-Source: AGHT+IHRmkid+ONnZxWsERlpn+rNq154Ir/hqU02cOGV/Ew9vQanY8eHObrPNHsiFiZboGHYFpiitw==
X-Received: by 2002:a17:902:d58f:b0:220:fe50:5b44 with SMTP id
 d9443c01a7336-22b2edeb921mr46089355ad.31.1744291182099; 
 Thu, 10 Apr 2025 06:19:42 -0700 (PDT)
Received: from localhost ([1.7.159.71]) by smtp.gmail.com with UTF8SMTPSA id
 d2e1a72fcca58-73bb1e38263sm3302821b3a.91.2025.04.10.06.19.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 10 Apr 2025 06:19:41 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Daniel Cerqueira <dan.list@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87o6x4qoc2.fsf@HIDDEN>
Date: Thu, 10 Apr 2025 18:15:31 +0530
Message-ID: <87lds89od0.fsf@HIDDEN>
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
 <87o6x4qoc2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 3.6 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [வியாழன் ஏப்ரல் 10, 2025] Daniel
    Cerqueira wrote: > I am coming back to this issue. It still is unresolved.
    > > I have made some progress, but still I get an error. Here is what I >
    have done: > > > My search configuration: > > (setq gnus-search-defa [...]
    
 
 Content analysis details:   (3.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [1.7.159.71 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (visuweshm[at]gmail.com)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2607:f8b0:4864:20:0:0:0:643 listed in]
                             [list.dnswl.org]
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.6 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [வியாழன் ஏப்ரல் 10, 2025] Daniel
    Cerqueira wrote: > I am coming back to this issue. It still is unresolved.
    > > I have made some progress, but still I get an error. Here is what I >
    have done: > > > My search configuration: > > (setq gnus-search-defa [...]
    
 
 Content analysis details:   (2.6 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [1.7.159.71 listed in zen.spamhaus.org]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2607:f8b0:4864:20:0:0:0:643 listed in]
                             [list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (visuweshm[at]gmail.com)
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

[=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=8F=
=E0=AE=AA=E0=AF=8D=E0=AE=B0=E0=AE=B2=E0=AF=8D 10, 2025] Daniel Cerqueira wr=
ote:

> I am coming back to this issue.  It still is unresolved.
>
> I have made some progress, but still I get an error.  Here is what I
> have done:
>
>
> My search configuration:
>
> (setq gnus-search-default-engines
>       '((nnimap . gnus-search-imap)
>         ;; (nnmaildir . gnus-search-find-grep)
>         ;; (nnselect . gnus-search-nnselect)
>         (nnselect . gnus-search-find-grep)))
>
> (setq gnus-select-method
>       `(nnmaildir "email"
>                   (directory ,(expand-file-name "~/Mail"))
>                   (remove-prefix ,(expand-file-name "~/Mail"))
>                   (nnmaildir-directory ,(expand-file-name "~/Mail"))
>                   (gnus-search-engine gnus-search-find-grep)))
>
>
> My error message:
>
> nnselect-generate-artlist: gnus-search-run-query on ((search-query-spec (=
query . parab=C3=A9ns) (raw)) (search-group-spec (nnmaildir:email friends))=
) gave error (wrong-type-argument stringp nil)
> nnselect-generate-artlist: nil on nil gave error (void-function nil) [2 t=
imes]
> gnus-request-group: Wrong type argument: stringp, nil

There are a number of problems with gnus-search-find-grep and its
interaction with a nnmaildir virtual server:

  1. It assumes that every mail server uses the server option
     SERVER-directory when nnmaildir uses only directory.
  2. It might not be obvious but your query should be grep:parab=C3=A9ns
     IIUC.
  3. However, (2) won't solve the issue because of the problematic find
     command that I talked about in the last mail.  You can work around
     this.
  4. Its conversion of nnmaildir mail filename to article number is not
     correct.

With all that accounted for, I ended up with the (ugly?) patch below.

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 41915a0e3c0..fa5eaf936b7 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1980,8 +1980,11 @@ gnus-search-run-search
 				      &optional groups)
   "Run find and grep to obtain matching articles."
   (let* ((method (gnus-server-to-method server))
-	 (sym (intern
-	       (concat (symbol-name (car method)) "-directory")))
+         ;; `nnmaildir' backends use the 'directory' setting.
+	 (sym (if (eq (car method) 'nnmaildir)
+                  'directory
+                (intern
+	         (concat (symbol-name (car method)) "-directory"))))
 	 (directory (cadr (assoc sym (cddr method))))
 	 (regexp (alist-get 'grep query))
 	 (grep-options (slot-value engine 'grep-options))
@@ -1996,6 +1999,11 @@ gnus-search-run-search
      #'vconcat
      (mapcar (lambda (x)
 	       (let ((group x)
+                     (nnmaildir-strip-regexp
+                      (concat (regexp-quote (gnus-group-real-name x))
+                              "/\\(?:new\\|cur\\)/"))
+                     (nnmaildir-strip-repl
+                      (concat (gnus-group-real-name x) "/"))
 		     artlist)
 		 (gnus-message 7 "Searching %s using find-grep..."
 			       (or group server))
@@ -2003,7 +2011,7 @@ gnus-search-run-search
 		   (set-buffer buffer)
 		   (if (> gnus-verbose 6)
 		       (pop-to-buffer (current-buffer)))
-		   (cd directory)    ; Using relative paths simplifies
+		   (cd directory)      ; Using relative paths simplifies
 					; postprocessing.
 		   (let ((group
 			  (if (not group)
@@ -2029,28 +2037,49 @@ gnus-search-run-search
 		     (save-excursion
 		       (apply
 			#'call-process "find" nil t
-			"find" group "-maxdepth" "1" "-type" "f"
-			"-name" "[0-9]*" "-exec"
-			(slot-value engine 'grep-program)
-			`("-l" ,@(and grep-options
-				      (split-string grep-options "\\s-" t))
-			  "-e" ,regexp "{}" "+"))))
+			"find"
+                        (delq
+                         nil   ; nil can be present if GREP-OPTIONS=3Dnil.
+                         `(,@(if (eq (car method) 'nnmaildir)
+                                 (list (concat group "/cur")
+                                       (concat group "/new"))
+                               group)
+                           "-maxdepth" "1" "-type" "f"
+			   "-name" "[0-9]*" "-exec"
+			   ,(slot-value engine 'grep-program)
+			   "-l" ,@(and grep-options
+				       (split-string grep-options "\\s-" t))
+			   "-e" ,regexp "{}" "+")))))
=20
 		   ;; Translate relative paths to group names.
 		   (while (not (eobp))
-		     (let* ((path (split-string
-				   (buffer-substring
-				    (point)
-				    (line-end-position))
-				   "/" t))
-			    (art (string-to-number (car (last path)))))
+		     (let* ((path (buffer-substring
+				   (point)
+				   (line-end-position)))
+                            (path (split-string (if (eq (car method) 'nnma=
ildir)
+                                                    (replace-regexp-in-str=
ing
+                                                     nnmaildir-strip-regexp
+                                                     nnmaildir-strip-repl
+                                                     path)
+                                                  path)
+                                                "/" t))
+			    (art (car (last path))))
 		       (while (string=3D "." (car path))
 			 (setq path (cdr path)))
 		       (let ((group (mapconcat #'identity
 					       (cl-subseq path 0 -1)
 					       ".")))
 			 (push
-			  (vector (gnus-group-full-name group server) art 0)
+			  (vector (gnus-group-full-name group server)
+                                  ;; FIXME: Code duplication.  This is
+                                  ;; copied over from
+                                  ;; `gnus-search-indexed-parse-output'.
+                                  (if (string-match-p "\\`[[:digit:]]+\\'"=
 art)
+		                      (string-to-number art)
+		                    (nnmaildir-base-name-to-article-number
+		                     (substring art 0 (string-search ":" art))
+		                     group (string-remove-prefix "nnmaildir:" server)))
+                                  0)
 			  artlist))
 		       (forward-line 1)))
 		   (gnus-message 7 "Searching %s using find-grep...done"







Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 10 Apr 2025 10:54:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 10 06:54:21 2025
Received: from localhost ([127.0.0.1]:44095 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u2pY4-0002ZX-My
	for submit <at> debbugs.gnu.org; Thu, 10 Apr 2025 06:54:21 -0400
Received: from forward500a.mail.yandex.net ([178.154.239.80]:36778)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dan.list@HIDDEN>)
 id 1u2pY1-0002ZC-Dr
 for 73581 <at> debbugs.gnu.org; Thu, 10 Apr 2025 06:54:18 -0400
Received: from mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net
 [IPv6:2a02:6b8:c1f:1014:0:640:8592:0])
 by forward500a.mail.yandex.net (Yandex) with ESMTPS id 92CCE6136A
 for <73581 <at> debbugs.gnu.org>; Thu, 10 Apr 2025 13:54:09 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id 7scedSBLlW20-aSbz1Df4; 
 Thu, 10 Apr 2025 13:54:08 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1744282449;
 bh=d2MUiHXZeXHLwEqNckIiRsN5JR6RLqGlyOP3Z9Qg1e4=;
 h=Message-ID:References:Date:To:In-Reply-To:Subject:From;
 b=fFIfANGhfdG4xaiCdqxE38swJrqGszUwOyt9LvOyyF2CQ4er0byFIsceNN/ilVbDs
 mKF0jhBBCTN+XP7KjKLK3vdQ2Ed7x9wBE5rpDrbbKKAdWMxRw1KhaXjpxIyQUE1gom
 qEwbRRD5k6udwaLIKhCkXJ8OOGK21q3aiIvct2BE=
Authentication-Results: mail-nwsmtp-smtp-production-main-55.vla.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: 73581 <at> debbugs.gnu.org
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <87bk03dqnc.fsf@HIDDEN> (Visuwesh's message of "Wed, 02 Oct
 2024 10:53:35 +0530")
References: <874j5x9med.fsf@HIDDEN> <87bk03dqnc.fsf@HIDDEN>
X-Hashcash: 1:27:250410:73581 <at> debbugs.gnu.org::rYMOnPYYjGZ8Rn4V:HAKB
Date: Thu, 10 Apr 2025 11:54:05 +0100
Message-ID: <87o6x4qoc2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I am coming back to this issue.  It still is unresolved.

I have made some progress, but still I get an error.  Here is what I
have done:


My search configuration:

(setq gnus-search-default-engines
      '((nnimap . gnus-search-imap)
        ;; (nnmaildir . gnus-search-find-grep)
        ;; (nnselect . gnus-search-nnselect)
        (nnselect . gnus-search-find-grep)))

(setq gnus-select-method
      `(nnmaildir "email"
                  (directory ,(expand-file-name "~/Mail"))
                  (remove-prefix ,(expand-file-name "~/Mail"))
                  (nnmaildir-directory ,(expand-file-name "~/Mail"))
                  (gnus-search-engine gnus-search-find-grep)))


My error message:

nnselect-generate-artlist: gnus-search-run-query on ((search-query-spec (qu=
ery . parab=C3=A9ns) (raw)) (search-group-spec (nnmaildir:email friends))) =
gave error (wrong-type-argument stringp nil)
nnselect-generate-artlist: nil on nil gave error (void-function nil) [2 tim=
es]
gnus-request-group: Wrong type argument: stringp, nil




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at 73581 <at> debbugs.gnu.org:


Received: (at 73581) by debbugs.gnu.org; 2 Oct 2024 05:51:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 01:51:08 2024
Received: from localhost ([127.0.0.1]:56303 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1svsGR-0000u2-Kz
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2024 01:51:08 -0400
Received: from mail-io1-f65.google.com ([209.85.166.65]:52542)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <visuweshm@HIDDEN>) id 1svsGP-0000ts-TZ
 for 73581 <at> debbugs.gnu.org; Wed, 02 Oct 2024 01:51:06 -0400
Received: by mail-io1-f65.google.com with SMTP id
 ca18e2360f4ac-82ceab75c27so385790339f.1
 for <73581 <at> debbugs.gnu.org>; Tue, 01 Oct 2024 22:51:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1727848205; x=1728453005; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=tsfc4bsx4uhb8k9mEEiwOkg9AkzyroMAF5COdtpb8rY=;
 b=BzmE8D82jKzjeJ/0jCaFWsV5JCc7dnnUTtldg3aJXIkWdrynZAxZz1BdsqQJCvQ/aZ
 P4mxd+qd35uE+zBZ9MtFSTJa0xOjjwwir7vJ2de9bTG0peplUsdD/7RC/JUQ+SBCVQJZ
 QP+fxZWNr+gSYXGmaBx7QDYlrU+f01rWaAIrahFzQJXF9zkZ4/77yi4FWi65B+7ymySN
 xHugvtXUXP4xwASYMvAgt9iycm9Ta4PhSXGiK1+KNdrNlapcaRkQdXmazwSd7xboh4JG
 QunZphpfI68adFHC1H8VY+dZ1n2YLviVynibR0cWqzK+zaSGAJOEzgc4UrP+SWgLjdZW
 3pSw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1727848205; x=1728453005;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=tsfc4bsx4uhb8k9mEEiwOkg9AkzyroMAF5COdtpb8rY=;
 b=rlVm5NyXKG8OJIND6VRDo4h4rhfdCpyIo3IhakEr//yBlFtRrLrlNV20c/M98YHKIW
 B++WibgiraEa5ceNCZp8xmLO+inzH4UUokTHYyWIcKQKpZ53XcDfyKyn4FW2CjLggoPF
 QpDfsb4NRuo2aIaO6U6rZT0na8BJ/6eMMBgCqT7XAC313NSjt8OnSsLyBxzRC1JpgQAs
 t2SnS+6SJmZ1JewrK6w6DsfFYJ+yH1XSWEiCpumXFjryWtObXzwnTZXum9eduHOumzAz
 ZokRw5f07x1aIYRzd4498L90BsiiBTxolB16PNGBFWFnexpsnXvKdb35HpBbgk96jKxD
 QQow==
X-Gm-Message-State: AOJu0YyycJtMGu9QVsw4Mq8ZLg7J5MD1M8x9XXntfj/v5GXZRRxhVaV+
 v6iQ6D44VXEC7zdDyEAwvkU9B0YC+zN3GN3ul7Apymm4o55TeusLjAfqXhjP
X-Google-Smtp-Source: AGHT+IHZtWS+ZDSRQBE0iL6C2+Yy3gcx06AlcIXaTInCsXFjcrPK3uZpuM0bSZMenRLixPztJkFEiw==
X-Received: by 2002:a17:903:183:b0:202:371c:3312 with SMTP id
 d9443c01a7336-20bc5a8ec65mr26895795ad.40.1727846619448; 
 Tue, 01 Oct 2024 22:23:39 -0700 (PDT)
Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-20b37d8ccfcsm78556285ad.72.2024.10.01.22.23.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 01 Oct 2024 22:23:39 -0700 (PDT)
From: Visuwesh <visuweshm@HIDDEN>
To: Daniel Cerqueira <dan.list@HIDDEN>
Subject: Re: bug#73581: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
In-Reply-To: <874j5x9med.fsf@HIDDEN> (Daniel Cerqueira's message of
 "Mon, 30 Sep 2024 16:44:26 +0100")
References: <874j5x9med.fsf@HIDDEN>
Date: Wed, 02 Oct 2024 10:53:35 +0530
Message-ID: <87bk03dqnc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 73581
Cc: 73581 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9A=
=E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=
=AF=8D 30, 2024] Daniel Cerqueira wrote:

> Using Gnus, doing 'G G' on a nnmaildir group gives me this error:
>
> ```
> nnselect-generate-artlist: gnus-search-run-query on
> ((search-query-spec (query . subject:meditation) (raw))
> (search-group-spec (nnmaildir:email archive clients crypto-archive
> crypto-sent drafts inbox git git-l10n job-hunting list medical penpal
> poker sent shopping software spam wellness writing) (nndraft
> nndraft:delayed) (nndraft:nnmaildir:email nndraft:drafts))) gave error
> (wrong-type-argument stringp nil)
> Group nnselect:nnselect-878qv99nf2.fsf contains no messages
> ```
>
> The relevant configuration of `~/.emacs` is:
>
> ```
> (setq message-kill-buffer-on-exit t) ;; C-c C-c kills the buffer
> (setq gnus-check-bogus-newsgroups t) ;; delete bogus newsgroups at gnus s=
tartup
>
> ;;; open gnus in topics mode
> (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
>
> ;;; lines with time
> (setq gnus-summary-line-format "%U%R%z%I %4L %(%[%-25,25D %-23,23f%]%) %s
> ")
>
> ;;; order threads by most recent date
> (setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date))
>
> ;; hide summary lines of articles that have scores lower than this
> (setq gnus-summary-expunge-below -9)
>
>
> (setq gnus-select-method
>       `(nnmaildir "email"
>                   (directory ,(expand-file-name "~/.mail"))
>                   (nnmaildir-directory ,(expand-file-name "~/.mail"))))
>
> (setq gnus-message-archive-group '((if (message-news-p) "list" "sent")))
> (setq nndraft-directory (expand-file-name "~/.mail/drafts"))
>
> (setq message-directory (expand-file-name "~/.mail"))
> (setq gnus-directory (expand-file-name "~/.emacs.d/news"))
> (setq nnfolder-directory (expand-file-name "~/.mail/archive"))
> (setq nnfolder-directory "~/.mail/archive")
> (setq nnfolder-active-file "~/.mail/archive/active")
> (setq gnus-server-alist '(("archive" nnfolder "archive"
>                            (nnfolder-directory "~/.mail/archive")
>                            (nnfolder-active-file "~/.mail/archive/active")
>                            (nnfolder-get-new-mail nil)
>                            (nnfolder-inhibit-expiry t))))
> (setq mail-default-directory "~/.mail")
> (setq smtpmail-queue-dir "~/.mail/.queued-mail")
>
> ;; gnus search
> (setq gnus-search-default-engines
>       '((nnimap . gnus-search-imap)
>         (nnmaildir . gnus-search-find-grep)
>         (nnselect . gnus-search-nnselect)))
> ```
>
> Gnus is running good, and I am trying to add searching capabilities to
> my, already organized, email.
>
> Doing an epheremal search using 'G G' with point on a nnmaildir group is
> giving me the error above. Doing the same of my Topic of my nnmaildir
> groups also give me this error.
>
> My GNU system has `grep` installed. I don't want to do searches on my
> maildirs with any other searching methods/executables.
>

IIRC, this is because the grep method does not change to the maildir
directory properly.  Since I do not know the maildir terminologies well,
if you say G G on a group named "nnmaildir+mail:spam" it does not
search in ~/.mail/spam/ but in ~/.mail/ using find with -maxdepth
1, which obviously fails.

[ AFAIR, the workaround I posted in bug#72196 does not work for the grep
  method.  ]




Information forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Oct 2024 15:54:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 01 11:54:44 2024
Received: from localhost ([127.0.0.1]:52228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1svfD0-0006GR-4e
	for submit <at> debbugs.gnu.org; Tue, 01 Oct 2024 11:54:44 -0400
Received: from lists.gnu.org ([209.51.188.17]:35890)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dan.list@HIDDEN>) id 1svIaJ-00008y-Az
 for submit <at> debbugs.gnu.org; Mon, 30 Sep 2024 11:45:18 -0400
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 <dan.list@HIDDEN>)
 id 1svIZm-0002C6-3G
 for bug-gnu-emacs@HIDDEN; Mon, 30 Sep 2024 11:44:42 -0400
Received: from forward102d.mail.yandex.net ([2a02:6b8:c41:1300:1:45:d181:d102])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dan.list@HIDDEN>)
 id 1svIZi-0008HZ-8a
 for bug-gnu-emacs@HIDDEN; Mon, 30 Sep 2024 11:44:41 -0400
Received: from mail-nwsmtp-smtp-production-main-95.klg.yp-c.yandex.net
 (mail-nwsmtp-smtp-production-main-95.klg.yp-c.yandex.net
 [IPv6:2a02:6b8:c42:874b:0:640:bc97:0])
 by forward102d.mail.yandex.net (Yandex) with ESMTPS id B17CA60B02
 for <bug-gnu-emacs@HIDDEN>; Mon, 30 Sep 2024 18:44:29 +0300 (MSK)
Received: by mail-nwsmtp-smtp-production-main-95.klg.yp-c.yandex.net
 (smtp/Yandex) with ESMTPSA id RibLJUO9aW20-kyy1jEL1; 
 Mon, 30 Sep 2024 18:44:28 +0300
X-Yandex-Fwd: 1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lispclub.com;
 s=mail; t=1727711069;
 bh=0zc2HUPoH9fUsVa6qbCF81O//Szsezp/TozIJLiT7Qw=;
 h=Message-ID:Date:Subject:To:From;
 b=nH+FeCt9MwFV4lTPzk4RRKwp/mKUOWkjMHgPL8bJuCXvRwXHVM6T4nP6b9HVpBeP/
 d8LaVAEv9fqoJlRjmnms0+v6YTNYwvFx9YKrj7Y6GyEwLKeBtyvnYDPAwaikvipenu
 i1vAQd8gf8wp5w7R30fS/KUZeUi9djmSo8onPW2o=
Authentication-Results: mail-nwsmtp-smtp-production-main-95.klg.yp-c.yandex.net;
 dkim=pass header.i=@lispclub.com
From: Daniel Cerqueira <dan.list@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.4; Gnus: Error doing a search on nnmaildir with
 gnus-search-find-grep
X-Debbugs-Package: emacs,gnus
Date: Mon, 30 Sep 2024 16:44:26 +0100
Message-ID: <874j5x9med.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Yandex-Filter: 1
Received-SPF: pass client-ip=2a02:6b8:c41:1300:1:45:d181:d102;
 envelope-from=dan.list@HIDDEN; helo=forward102d.mail.yandex.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 01 Oct 2024 11:54:41 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)



Using Gnus, doing 'G G' on a nnmaildir group gives me this error:

```
nnselect-generate-artlist: gnus-search-run-query on ((search-query-spec (query . subject:meditation) (raw)) (search-group-spec (nnmaildir:email archive clients crypto-archive crypto-sent drafts inbox git git-l10n job-hunting list medical penpal poker sent shopping software spam wellness writing) (nndraft nndraft:delayed) (nndraft:nnmaildir:email nndraft:drafts))) gave error (wrong-type-argument stringp nil)
Group nnselect:nnselect-878qv99nf2.fsf contains no messages
```

The relevant configuration of `~/.emacs` is:

```
(setq message-kill-buffer-on-exit t) ;; C-c C-c kills the buffer
(setq gnus-check-bogus-newsgroups t) ;; delete bogus newsgroups at gnus startup

;;; open gnus in topics mode
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)

;;; lines with time
(setq gnus-summary-line-format "%U%R%z%I %4L %(%[%-25,25D %-23,23f%]%) %s
")

;;; order threads by most recent date
(setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date))

;; hide summary lines of articles that have scores lower than this
(setq gnus-summary-expunge-below -9)


(setq gnus-select-method
      `(nnmaildir "email"
                  (directory ,(expand-file-name "~/.mail"))
                  (nnmaildir-directory ,(expand-file-name "~/.mail"))))

(setq gnus-message-archive-group '((if (message-news-p) "list" "sent")))
(setq nndraft-directory (expand-file-name "~/.mail/drafts"))

(setq message-directory (expand-file-name "~/.mail"))
(setq gnus-directory (expand-file-name "~/.emacs.d/news"))
(setq nnfolder-directory (expand-file-name "~/.mail/archive"))
(setq nnfolder-directory "~/.mail/archive")
(setq nnfolder-active-file "~/.mail/archive/active")
(setq gnus-server-alist '(("archive" nnfolder "archive"
                           (nnfolder-directory "~/.mail/archive")
                           (nnfolder-active-file "~/.mail/archive/active")
                           (nnfolder-get-new-mail nil)
                           (nnfolder-inhibit-expiry t))))
(setq mail-default-directory "~/.mail")
(setq smtpmail-queue-dir "~/.mail/.queued-mail")

;; gnus search
(setq gnus-search-default-engines
      '((nnimap . gnus-search-imap)
        (nnmaildir . gnus-search-find-grep)
        (nnselect . gnus-search-nnselect)))
```

Gnus is running good, and I am trying to add searching capabilities to
my, already organized, email.

Doing an epheremal search using 'G G' with point on a nnmaildir group is
giving me the error above. Doing the same of my Topic of my nnmaildir
groups also give me this error.

My GNU system has `grep` installed. I don't want to do searches on my
maildirs with any other searching methods/executables.





Did not crash.


In GNU Emacs 29.4 (build 2, x86_64-pc-linux-gnu) of 2024-09-29 built on
 torre
Repository revision: 6a299b3caceb2c73b932ba73849738faa8c5d975
Repository branch: release
System Description: Parabola GNU/Linux-libre

Configured using:
 'configure --without-x --with-x=no --with-x-toolkit=no --without-dbus
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --without-xim --disable-largefile --with-modules --without-libsystemd
 --without-cairo --without-gpm'

Configured features:
ACL GMP GNUTLS JSON LCMS2 LIBXML2 MODULES NOTIFY INOTIFY PDUMPER SECCOMP
SOUND SQLITE3 THREADS TREE_SITTER XIM ZLIB

Important settings:
  value of $LANG: pt_PT.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  bug-reference-prog-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-autoaway-mode: t
  erc-log-mode: t
  windmove-mode: t
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  rainbow-delimiters-mode: t
  paredit-mode: t
  emms-mode-line-mode: t
  emms-playing-time-display-mode: t
  emms-playing-time-mode: t
  jabber-activity-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-networks-mode: t
  server-mode: t
  winner-mode: t
  display-time-mode: t
  electric-pair-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: linux
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/guest/me/programming/desktop/emacs-jabber/lisp/jabber-autoloads hides /home/guest/me/programming/desktop/emacs-jabber/jabber-autoloads
/home/guest/.emacs.d/elpa/transient-20240918.1138/transient hides /usr/local/share/emacs/29.4/lisp/transient

Features:
(shadow emacsbug bug-reference grep apropos info-look emacs-news-mode
face-remap gnus-search markdown-mode noutline outline vc-git diff-mode
vc-dispatcher webjump view diary-lib diary-loaddefs solar cal-dst
holidays holiday-loaddefs cal-move mailalias erc-list erc-menu erc-ring
erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp
erc-netsplit erc-autoaway erc-log dired-aux ispell pcmpl-unix pcmpl-gnu
canlock cl-print re-builder tabify imenu man epa-mail transpose-frame
windmove mail-extr gnus-bcklg compile expand-region text-mode-expansions
html-mode-expansions er-basic-expansions expand-region-core
expand-region-custom misearch multi-isearch textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check eww xdg gnus-ml
jka-compr disp-table mule-util display-line-numbers shortdoc gnus-async
gnus-cite gnus-cus gnus-demon gnus-diary nndiary gnus-draft gnus-dup
gnus-fun gnus-html url-queue gnus-kill gnus-logic gnus-mh mh-comp
mh-scan mh-gnus mh-e mh-buffers mh-loaddefs gnus-registry registry
rmailsum rmail gnus-salt gnus-uu yenc gnus-vm nnselect help-fns
radix-tree qp cus-edit cus-start cus-load jabber-rtt captain
sasl-scram-rfc sasl-scram-sha-1 rfc2104 hex-util sh-script rx smie
treesit executable files-x shell pcomplete gnus-topic mm-archive
url-http url-gw url-cache url-auth nndraft nnmh nnrss utf-7 epa-file
network-stream nsm nnfolder nnmaildir gnus-agent gnus-srvr gnus-score
score-mode nnvirtual nntp gnus-cache t-mouse term/linux
rainbow-delimiters paredit go-translate go-translate-v2
gts-engine-youdao gts-engine-stardict gts-engine-deepl
gts-engine-google-rpc gts-engine-google gts-engine-bing gts-implements
gts-faces gts-core warnings icons gt-text-utility gt-engine-echo
gt-engine-chatgpt gt-engine-youdao gt-engine-stardict gt-engine-deepl
gt-engine-google-rpc gt-engine-google gt-engine-bing gt-extension
gt-faces gt-core let-alist transient edmacro kmacro emms-idapi-browser
emms-idapi emms-idapi-musicbrainz emms-mpris emms-librefm-stream
emms-librefm-scrobbler emms-playlist-limit emms-i18n emms-history
emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks
emms-cue emms-mode-line-icon emms-browser sort emms-volume easy-mmode
emms-volume-sndioctl emms-volume-mixerctl emms-volume-pulse
emms-volume-amixer emms-playlist-sort emms-last-played emms-player-xine
emms-player-mpd tq emms-lyrics emms-url emms-streams emms-show-all
emms-tag-editor emms-tag-tracktag emms-mark emms-mode-line emms-cache
emms-info-native emms-info-native-spc emms-info-native-mp3
emms-info-native-ogg emms-info-native-opus emms-info-native-flac
emms-info-native-vorbis bindat emms-info-tinytag emms-info-metaflac
emms-info-opusinfo emms-info-ogginfo emms-info-mp3info
emms-playlist-mode emms-player-vlc emms-player-mpv emms-playing-time
emms-player-mplayer emms-player-simple emms-source-playlist
emms-source-file locate emms-setup emms-info-exiftool emms-info
emms-later-do emms emms-compat jabber-httpupload jabber jabber-time
jabber-autoaway jabber-vcard-avatars jabber-chatstates jabber-events
jabber-vcard jabber-avatar jabber-activity jabber-watch jabber-modeline
jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion
jabber-muc-nick-completion hippie-exp comint ansi-osc ansi-color
jabber-muc jabber-bookmarks jabber-muc-nick-coloring color jabber-browse
jabber-search jabber-register jabber-widget jabber-chat jabber-history
jabber-chatbuffer jabber-roster jabber-carbons jabber-presence
jabber-private jabber-logon jabber-conn srv dns starttls jabber-core
jabber-keepalive jabber-ping jabber-disco jabber-iq jabber-console
sgml-mode facemenu jabber-truncate ewoc jabber-alert jabber-keymap
jabber-sasl sasl sasl-anonymous sasl-login sasl-plain jabber-menu
jabber-util jabber-xml goto-addr fsm jabber-autoloads weri erc-goodies
erc thingatpt pp format-spec erc-backend erc-networks erc-common
erc-compat compat compat-30 erc-loaddefs ebdb-message ebdb-gnus gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr
pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start
gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range message yank-media puny
dired dnd dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils
mailheader gnus-win ebdb-mua ebdb-com crm ebdb-format ebdb regexp-opt
mailabbrev eieio-opt cl-extra help-mode speedbar ezimage dframe
find-func eieio-base cal-menu calendar cal-loaddefs timezone server
pinentry advice mm-url gnus nnheader gnus-util text-property-search
time-date range wid-edit smtpmail sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils winner ring ido time image elec-pair
my-lisp 0x0-autoloads 0xc-autoloads 2048-game-autoloads 2bit-autoloads
4clojure-autoloads captain-autoloads clhs-autoloads ebdb-autoloads
emms-autoloads expand-region-autoloads fsm-autoloads
ledger-mode-autoloads magit-autoloads pcase magit-section-autoloads
dash-autoloads markdown-mode-autoloads paredit-autoloads
pinentry-autoloads plisp-mode-autoloads po-mode-autoloads
rainbow-delimiters-autoloads request-autoloads s-autoloads srv-autoloads
transient-autoloads transpose-frame-autoloads with-editor-autoloads info
tool-bar compat-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads inotify lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 1817214 244127)
 (symbols 48 138452 33)
 (strings 32 363961 65668)
 (string-bytes 1 15169011)
 (vectors 16 111054)
 (vector-slots 8 3315957 244523)
 (floats 8 1026 1222)
 (intervals 56 138365 3776)
 (buffers 984 58))





Acknowledgement sent to Daniel Cerqueira <dan.list@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN, bugs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN, bugs@HIDDEN:
bug#73581; Package emacs,gnus. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 12 Apr 2025 13:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.