Gnus development mailing list
 help / color / mirror / Atom feed
From: Alexandr Vityazev <avityazev@posteo.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: ding@gnus.org
Subject: Re: Help testing gnus-search fixups
Date: Sun, 25 Jul 2021 11:17:19 +0000	[thread overview]
Message-ID: <87fsw21w3k.fsf@posteo.org> (raw)
In-Reply-To: <87h7gj9x2w.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 24 Jul 2021 15:16:39 -0700")

[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]

On 2021-07-24, 15:16 -0700, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

> On 07/23/21 18:52 PM, Alexandr Vityazev wrote:
>> On 2021-07-23, 08:18 -0700, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
>>
>>> On 07/23/21 13:12 PM, Alexandr Vityazev wrote:
>>>> Hi!
>>>>
>>>> GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24,
>>>> cairo version 1.16.0). Gnus v5.13.
>>>>
>>>> I tested the new version of gnus-search-indexed-parse-output yesterday
>>>> and the search with notmuch completely fails. gnus-verbose is set to
>>>> 10. press GG and type any search query, with the patch, I get:
>>>>
>>>>   Doing /home/akagi/.guix-profile/bin/notmuch query on
>>>>   (nnmaildir+posteo:Drafts nnmaildir+posteo:Inbox nnmaildir+posteo:Sent
>>>>   nnmaildir+posteo:Trash nnmaildir+posteo:Notes)...
>>>>   Group nnselect:nnselect-87lf5xus2s.fsf contains no messages
>>>
>>> Hi, thanks for the report. Would you mind running your query on the
>>> command line (using the same syntax as gnus-search does, mostly
>>> output=files), and sending me the resulting list of file names
>>> (off-list, if you prefer). I'll try to find out why the parsing process
>>> is failing.
>>>
>>>
>> notmuch search --output=files test
>>
>>
>>
>> in *Group* GG with "test" query, I get:
>>
>>    Doing /home/akagi/.guix-profile/bin/notmuch query on
>>    (nnmaildir+posteo:Drafts nnmaildir+posteo:Inbox nnmaildir+posteo:Sent
>>    nnmaildir+posteo:Trash nnmaildir+posteo:Notes nnmaildir+posteo:Junk)...
>>    Group nnselect:nnselect-87czr8uasp.fsf contains no messages
>
> Hmm, I'm not able to reproduce this: it's a little difficult since I
> don't actually have the files on my machine, but as far as I can tell
> the search results are being parsed correctly. Are you familiar with
> edebug at all? Is there any chance I could get you to step through the
> function and see where things are going off?
>
> Thanks,
> Eric
>
>
I tested gnus-search-indexed-parse-output with edebug and found where
something is going on. The attached patch fixes the issue for me.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-search-indexed-parse-output --]
[-- Type: text/x-patch, Size: 1383 bytes --]

From bfba4f38289223c3e78b19a73ad9133d015f8420 Mon Sep 17 00:00:00 2001
From: Alexandr Vityazev <avityazev@posteo.org>
Date: Sun, 25 Jul 2021 14:09:39 +0300
Subject: [PATCH] gnus-search: gnus-search-indexed-parse-output: Fix search
 issue.

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output):
Setting the group variable after the article variable.
---
 lisp/gnus/gnus-search.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 39bde837b3..80c3ce62f1 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1384,7 +1384,6 @@ Returns a list of [group article score] vectors."
                    nil t)
 	          nil t)
 	         nil t))
-          (setq group (gnus-group-full-name group server))
           (setq article (file-name-nondirectory f-name)
                 article
                 ;; TODO: Provide a cleaner way of producing final
@@ -1394,6 +1393,7 @@ Returns a list of [group article score] vectors."
 		  (nnmaildir-base-name-to-article-number
 		   (substring article 0 (string-match ":" article))
 		   group (string-remove-prefix "nnmaildir:" server))))
+          (setq group (gnus-group-full-name group server))
           (when (and (numberp article)
                      (or (null groups)
                          (member group groups)))
-- 
2.32.0


[-- Attachment #3: Type: text/plain, Size: 37 bytes --]


-- 
Best regards,
Alexandr Vityazev

  reply	other threads:[~2021-07-25 18:27 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 16:42 Eric Abrahamsen
2021-06-28 18:00 ` Adam Sjøgren
2021-06-28 23:15   ` Eric Abrahamsen
2021-06-29  6:04     ` Thomas Alexander Gerds
2021-06-29  9:30     ` Adam Sjøgren
2021-06-29  9:55       ` Adam Sjøgren
2021-06-29 11:03         ` Thomas Alexander Gerds
2021-06-29 11:13           ` Adam Sjøgren
2021-06-29 11:25             ` Adam Sjøgren
2021-06-30 16:58               ` Eric Abrahamsen
     [not found]                 ` <87bl6tuqcb.fsf@posteo.org>
2021-07-23 15:18                   ` Eric Abrahamsen
     [not found]                     ` <87bl6sual8.fsf@posteo.org>
2021-07-24 22:16                       ` Eric Abrahamsen
2021-07-25 11:17                         ` Alexandr Vityazev [this message]
2021-07-25 22:11                           ` Eric Abrahamsen
2021-07-30 18:17                           ` Joseph Mingrone
2021-07-30 18:22                             ` Joseph Mingrone
2021-07-30 18:47                               ` Eric Abrahamsen
2021-07-30 19:29                                 ` Joseph Mingrone
2021-07-30 20:23                                   ` Eric Abrahamsen
2021-07-30 19:34                             ` Alexandr Vityazev
2021-07-30 20:25                               ` Eric Abrahamsen
2021-08-05 17:15                                 ` Eric Abrahamsen
2021-08-05 19:54                                   ` Alexandr Vityazev
2021-08-05 20:19                                     ` Joseph Mingrone
2021-08-05 21:24                                       ` Eric Abrahamsen
2021-08-05 21:38                                         ` Joseph Mingrone
2021-08-07 16:07                                           ` Eric Abrahamsen
2021-08-10  7:32                                             ` Daniel Jensen
2021-08-13 16:50                                               ` Eric Abrahamsen
2021-08-13 19:30                                                 ` Daniel Jensen
2021-08-13 19:37                                                   ` Eric Abrahamsen
2021-06-29 11:27 ` Eric S Fraga
2021-09-11 13:29 Sergey Makarov
2021-09-11 15:04 ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsw21w3k.fsf@posteo.org \
    --to=avityazev@posteo.org \
    --cc=ding@gnus.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).