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: Sat, 14 Mar 2020 19:30:25 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)

physiculus <physiculus@gmail.com> writes:

> xuqi <haoyang@expoundite.net> writes:
>
> Hello,
> thank you for your info.
> Unfortunately i'm not a developer, so i don't understand all you wrote.
> As far as i understand, you mean, that the problem is with notmuch?
> But why is it working, if i call the command in terminal directly.
> Perhaps some parameters, that push gnus to notmuch?

While your notmuch runs all right in the terminal, nnir runs notmuch in
Emacs environments and then processes the results so they can be used by
Gnus. I suspect something went wrong there.

I didn't look closely. But for example if you haven't customized the
variable `nnir-notmuch-remove-prefix', it defaults to "$HOME/Mail", if
your Maildir is not ~/Mail (Gnus advices against using ~/Mail for
maildir, iirc), the processed results may point Gnus to a wrong
location.

Perhaps you can paste your nnmaildir config in your .gnus.el to the
list, or point to me where to find it if you have done so. And the value
of your `nnir-notmuch-remove-prefix', you can find that by pressing C-h
v RET nnir-notmuch-remove-prefix RET.

Then you can go to your *scratch* buffer -- sorry if it shows in bold
when you read this, but the buffer name has asterisks -- and input the
following, parentheses included:

    (nnir-run-notmuch "Hock" "nnmaildir:Lokal")

and press C-x C-e with your cursor after the closing parenthesis, this
will run the command `nnir-run-notmuch', the results would be in the
messages. Post those as well.

>
> Regards
> Poul
>
>
>> physiculus <physiculus@gmail.com> writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>> Hello,
>>>
>>> here is the output from the debugger.
>>> I dont know, what it mean, but i think you do :-)
>>>
>>> Hope it helps!
>>>
>>>
>>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>>>   <(nil nil)
>>>   sort((nil) <)
>>>   nnir-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
>>> 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
>>> 42 43 44 45 46 47 48 49 50 ...) "nnir-87zhckegiv.fsf" "nnir-ephemeral"
>>> nil)
>>
>> A look at the source code of function `nnir-retrieve-headers' would
>> help. You can find the code by pressing C-h f RET nnir-retrieve-headers
>> and click `nnir.el' in the help buffer.
>>
>> At the front of this function you will see a call to the function
>> `sort':
>>
>>      (let* ((group-articles (pop articles-by-group))
>>             (artgroup (car group-articles))
>>             (articleids (cadr group-articles))
>>             (artlist (sort (mapcar 'cdr articleids) '<))
>>                          ~~~~
>>             (server (gnus-group-server artgroup))
>>                ...
>>
>> The error message tells us that the 1st argument of `sort', (mapcar 'cdr
>> articleids) returns a list of nils. This involves a bunch of variables
>> and list operations, but by the documentation of `nnir-categorize' we
>> can infer that the structure of `group-articles' look like this:
>>
>>     '((group1
>>         ((nnir-article-ids article11)
>>          (nnir-article-ids article12)
>>          ...))
>>       (group2
>>         ((nnir-article-ids article21)
>>          (nnir-article-ids article22)
>>          ...))
>>       (group3
>>         ...))
>>
>> So `articleids' are this part: (nnir-article-ids article11)
>>
>> and `artlist' should be a list like this '(article11 article12 article21
>> ...)
>>
>> In this case, the first argument to `nnir-categorize' may be nil, thus
>> article11 ... are all nils, so you get a list of nils.
>>
>> The most likely reason therefore is that notmuch can't produce a list of
>> articles with your search conditions. I haven't used notmuch with gnus
>> so I can only provide a guess.
>>
>>>   gnus-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
>>> 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
>>> 42 43 44 45 46 47 48 49 50 ...) "nnir:nnir-87zhckegiv.fsf" nil)
>>>   gnus-cache-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
>>> 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
>>> 40 41 42 43 44 45 46 47 48 49 50 ...) "nnir:nnir-87zhckegiv.fsf" nil)
>>>   gnus-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
>>> 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
>>> 42 43 44 45 46 47 48 49 50 ...) "nnir:nnir-87zhckegiv.fsf" nil)
>>>   gnus-fetch-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
>>>   19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
>>>   41 42 43 44 45 46 47 48 49 50 ...))
>>>   gnus-select-newsgroup("nnir:nnir-87zhckegiv.fsf" t nil)
>>>   gnus-summary-read-group-1("nnir:nnir-87zhckegiv.fsf" t t nil nil nil)
>>>   gnus-summary-read-group("nnir:nnir-87zhckegiv.fsf" t t nil nil nil nil)
>>>   gnus-group-read-group(t t "nnir:nnir-87zhckegiv.fsf" nil)
>>>   gnus-group-read-ephemeral-group("nnir-87zhckegiv.fsf" (nnir "nnir")
>>> nil nil nil nil ((nnir-specs (nnir-query-spec (query . "hock"))
>>> (nnir-group-spec ("nnmaildir:Lokal")))))
>>>   gnus-group-make-nnir-group(nil)
>>>   funcall-interactively(gnus-group-make-nnir-group nil)
>>>   call-interactively(gnus-group-make-nnir-group nil nil)
>>>   command-execute(gnus-group-make-nnir-group)
>>>
>>>> physiculus <physiculus@gmail.com> writes:
>>>>
>>>>> Hello,
>>>>> if i try to use search with notmuch my nnmaildir, i get the error above.
>>>>> here are the lines from messages:
>>>>> Opening nnir server on nnir-ephemeral...done
>>>>> Retrieving newsgroup: nnir:nnir-877dzp783m.fsf...
>>>>> Doing notmuch query Hock...
>>>>> notmuch args: search --format=text --output=files Hock
>>>>> Massaging notmuch output...done
>>>>> Fetching headers for nnir:nnir-877dzp783m.fsf...
>>>>> sort: Wrong type argument: number-or-marker-p, nil
>>>>
>>>> Can you run M-x toggle-debug-on-error, then trigger this error again,
>>>> and send the backtrace to the list?
>>>>
>>>> Thanks,
>>>> Eric
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>
> _______________________________________________
> 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]