Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: xuqi <haoyang@expoundite.net>
To: info-gnus-english@gnu.org
Subject: Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil
Date: Mon, 16 Mar 2020 02:50:05 +0800	[thread overview]
Message-ID: <m18sk1ihb6.fsf@expoundite.net> (raw)
In-Reply-To: <878sk1970i.fsf@googlemail.com>

physiculus <physiculus@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> Ok, here is the list. Hope it helps :-)
>
Unfortunately it doesn't in this case ;-) see my reply below:

> /home/held/Maildirnm/Privat/cur/1584002263.M785296P11519Q0.kubuntu:2,S
> /home/held/Maildirnm/Privat/cur/1584001757.M962421P11519Q0.kubuntu:2,
> /home/held/Maildirnm/Privat/cur/1584001970.M953224P11519Q0.kubuntu:2,
> /home/held/Maildirnm/Privat/cur/1584002264.M177070P11519Q0.kubuntu:2,S
> /home/held/Maildirnm/Privat/cur/1584002264.M570398P11519Q1.kubuntu:2,S
> /home/held/Maildirnm/karlderletzte/INBOX/cur/1554399542.4634_1560.shinri,U=651:2,S
> /home/held/Maildirnm/karlderletzte/Sent/cur/1554294583.6ad7d1c538e8c734.shinri:2,,U=22:2,S!2,S
>
>> physiculus <physiculus@gmail.com> writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>> Hmmh, this looks different and with no errors.
>>> But is this in format, which gnus could read?
>>>
>>> the result is displayed in *Message* Buffer. Is this correct?
>>>
>>> Poulpoulsen
>>>
>>> Doing notmuch query Hock...
>>> notmuch args: search --format=text --output=files Hock
>>> Massaging notmuch output...done
>>> (["nnmaildir+Lokal:Privat" 349 0] ["nnmaildir+Lokal:Privat" 446 0]
>>> ["nnmaildir+Lokal:Privat" 506 0] ["nnmaildir+Lokal:Privat" 333 0]
>>> ["nnmaildir+Lokal:ZuErledigen" 399 0] ["nnmaildir+Lokal:ZuErledigen" 131
>>> 0] ["nnmaildir+Lokal:ZuErledigen" 226 0] ["nnmaildir+Lokal:Linzessin" 34
>>> 0] ["nnmaildir+Lokal:ZuErledigen" 318 0] ["nnmaildir+Lokal:ZuErledigen"
>>> 266 0] ["nnmaildir+Lokal:ZuErledigen" 42 0] ["nnmaildir+Lokal:logins"
>>> 156 0] ...)

It would help if we can see the complete list here. Unfortunately,
unless notmuch encounters a problem and value of `gnus-verbose' is > 6,
`nnir-tmp-buffer' would be erased. In your case notmuch runs perfectly
well.

However, after looking at the code of `nnir-retrieve-headers` more
closely, I think I narrowed down the range of possible courses a bit.

The offending line of code `(sort (mapcar 'cdr articleids) '<)` for one
of your searchs would translate into something like this:

   (sort (mapcar 'cdr (cadr 
		    '("nnmaildir+Lokal:Privat"
		      ((1 . 349)
		       (2 . 446)
		       (3 . 506)
		       (4 . 333))))) '<)

In this case it would run and give you the result:

   '(333 349 446 506)

But down the line, one or more of the articles would have ID(s) that are
nil. Maybe it's a file that's not properly synced. In the search result
it probably looks like this:

   ["nnmaildir+Lokal:SomeFolder" nil 0]

>>
>> That looks correct, but it would be important to see the whole list. Can
>> you still do the (switch-to-buffer nnir-tmp-buffer) and paste the
>> contents here?

As Eric mentioned, it is important to see the whole list. To get the
whole list generated by `nnir-run-notmuch', you can wrap your search
like this:

     (progn
      (setq xbuff (generate-new-buffer "*my output*"))
      (print (nnir-run-notmuch '((query . "hock")) "nnmaildir:Lokal") xbuff)
      (switch-to-buffer xbuff ))

Then you can copy the content of *my output* and paste it here. If
indeed there were some nils in the result, we should be able to find the
corresponding file using `nnmaildir-article-number-to-file-name' and
more elisp.

>>
>>
>> _______________________________________________
>> info-gnus-english mailing list
>> info-gnus-english@gnu.org
>> https://lists.gnu.org/mailman/listinfo/info-gnus-english
>
> _______________________________________________
> info-gnus-english mailing list
> info-gnus-english@gnu.org
> https://lists.gnu.org/mailman/listinfo/info-gnus-english


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

  reply	other threads:[~2020-03-15 19:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 18:27 physiculus
2020-03-12 19:09 ` Eric Abrahamsen
2020-03-13  9:46   ` physiculus
2020-03-13 17:04     ` xuqi
2020-03-14  7:52       ` physiculus
2020-03-14 11:30         ` xuqi
2020-03-14 15:31           ` physiculus
2020-03-14 16:11             ` Eric Abrahamsen
2020-03-14 16:23               ` physiculus
2020-03-14 16:47                 ` Eric Abrahamsen
2020-03-15 11:45                   ` physiculus
2020-03-15 18:50                     ` xuqi [this message]
2020-03-16 18:42                       ` physiculus
2020-03-16 19:42                         ` Eric Abrahamsen
2020-03-17  8:50                           ` physiculus
2020-03-17 14:22                             ` physiculus
2020-03-18  1:27                               ` xuqi
2020-03-18 18:02                                 ` physiculus
2020-03-19 22:56                                   ` Eric Abrahamsen
2020-03-25 19:05                           ` nnir with notmuch gives error; Possible solution! physiculus
2020-03-25 19:19                             ` Eric Abrahamsen
2020-03-26 19:16                               ` Helmut Waitzmann
2020-03-15 22:09                     ` nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil Eric Abrahamsen
2020-03-13 18:51     ` Eric Abrahamsen
2020-03-14  7:54       ` physiculus

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=m18sk1ihb6.fsf@expoundite.net \
    --to=haoyang@expoundite.net \
    --cc=info-gnus-english@gnu.org \
    /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).