info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-


From: xuqi
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]