Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-19 Thread Eric Abrahamsen
physiculus  writes:

> xuqi  writes:
>
>>
>> As the Gnus manual described, if you have one Maildir server, you only
>> need to specific its directory once. All its subdirectories would be
>> treated as groups in Gnus.
> Hmmh, i dont know that. will check if it works.
>
>>
>> More importantly, I don't find 'karlderletzte' as a directory in your
>> config. The way you set the maildir up may have something to do with the
>> filenames in the karlderletzte folder. That this directory has even more
>> subdirectories which look like maildir directories is also peculiar.
>>
> Hello,
> sorry i only posted the config for the Lokal folders.

This has all gotten a bit confusing, but is it possible that you're
using notmuch to index and search groups that are in fact part of your
nnimap installation? Or that the groups belong to both your nnmaildir
and nnimap servers? That might explain why you can open messages in the
group, but the search results are failing for those messages.

This is kind of a shot in the dark. As xuqi says, I think you'd be
better off first cleaning up your nnmaildir installation.

Eric

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-18 Thread physiculus
xuqi  writes:

>
> As the Gnus manual described, if you have one Maildir server, you only
> need to specific its directory once. All its subdirectories would be
> treated as groups in Gnus.
Hmmh, i dont know that. will check if it works.

>
> More importantly, I don't find 'karlderletzte' as a directory in your
> config. The way you set the maildir up may have something to do with the
> filenames in the karlderletzte folder. That this directory has even more
> subdirectories which look like maildir directories is also peculiar.
>
Hello,
sorry i only posted the config for the Lokal folders.
here is it:
(nnimap "Karl"
  (nnimap-address 
".yyy.server-he.de")
  (nnimap-server-port "imap")
  (nnimap-user "-")
  (nnimap-stream starttls)
  (nnimap-inbox "INBOX")
  (nnimap-expunge 'on-exit)
  (nnimap-split-methods default)
  (spam-autodetect-recheck-messages 
t)
  (nnimap-split-download-body t)
  (spam-process ((spam 
spam-use-bogofilter)
 (ham 
spam-use-bogofilter)))
  (nnmail-split-fancy
   (&
(&
(: spam-split "regex-spam" 
'spam-use-regex-headers)
(: 
nnmail-split-fancy-with-parent)
(: spam-split)
)
(|
 (&
 (any ".*pinterest\\.com" 
"Pinterest")
 (any ".*forum@papyrus\\.de" 
"Papyrus")
 (any ".*instructables\\.com" 
"Instructables")
 (any 
".*abgeordnetenwatch\\.de" "Politik")
 (any ".*change\\.org" 
"Politik")
 (any ".*netzpolitik\\.org" 
"Politik")
 (any 
".*info@newsletter\\.greenpeace\\.de" "Politik")
 (any ".*@lubera\\.com" 
"Garten")
 (any 
".*@sarastro-stauden\\.com" "Garten")
 (any ".*@stauden-stade\\.de" 
"Garten")
 (any 
".*@rosenpark-draeger\\.de" "Garten")
 (any 
".*@pflanzenversand-gaissmayer\\.de" "Garten")
 (any 
".*@garten-schlueter\\.de" "Garten")
 (any 
".*@bohlken-baumschulen\\.de" "Garten")
 (any ".*@staudenundrosen\\.de" 
"Garten")
 (any ".*@groenloof\\.de" 
"Garten")
 (any 
".*news@baumschule-horstmann\\.de" "Garten")
 (any 
".*@davidaustinroses\\.com" "Garten")
 (any 
".*vermietung@deutscheshaus-fl\\.de" "51Stufen")
 )
(any ".*s@hx\\.de" 
"s")
))
"INBOX")
  ;;(nnimap-split-methods default)
  (get-new-mail t)
  (nnir-search-engine imap)
  )


>>  
>
> Have you actually used B m to move email to 'karlderletzte/INBOX' or
> 'karlderletzte/Sent' folder? Or do you use it for other purposes than
> moving email manually into it? Perhaps splitting? Caching?
i use it for bot cases. reason is, that gnus could not split messages
from imap to nnmaildir. as far as i understood from different answers
here or from emacs.stackexchange.com.
no offlineimap or isync.


>
> It would make things a bit more clear if you could let us know if you
> configured this karlderletzte folder for some other use. Please have a
> look at your Emacs, gnus, notmuch, imap server if any, 

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-17 Thread xuqi
physiculus  writes:

> physiculus  writes:
>
> Hello,
> additional note:
> here is my config for Lokales. Exactly spoken its Lokal.
>
>
Hello Poul,

> (nnmaildir "Lokal"
>  (directory "~/Maildirnm")
>  (directory 
> "~/Maildirnm/archive")
>  (directory 
> "~/Maildirnm/attachments")
>  (directory 
> "~/Maildirnm/BugsandFeatures")
>  (directory "~/Maildirnm/bwp")
>  (directory 
> "~/Maildirnm/Campact")
>  (directory 
> "~/Maildirnm/draft")
>  (directory 
> "~/Maildirnm/drafts")
>  (directory 
> "~/Maildirnm/Ebay")
>  (directory 
> "~/Maildirnm/Ebay_noch_suchen")
>  (directory 
> "~/Maildirnm/Emacs")
>  (directory 
> "~/Maildirnm/emms")
>  (directory 
> "~/Maildirnm/Enteignung")
>  (directory 
> "~/Maildirnm/Feedburner")
>  (directory 
> "~/Maildirnm/fritz")
>  (directory 
> "~/Maildirnm/Garten")
>  (directory 
> "~/Maildirnm/gnus")
>  (directory 
> "~/Maildirnm/Held_Wichtig")
>  (directory 
> "~/Maildirnm/inbox")
>  (directory 
> "~/Maildirnm/Informatik")
>  (directory 
> "~/Maildirnm/Instructables")
>  (directory 
> "~/Maildirnm/Lehrerausbildung")
>  (directory 
> "~/Maildirnm/Linzessin")
>  (directory 
> "~/Maildirnm/logins")
>  (directory 
> "~/Maildirnm/mnp-notes")

[...]

As the Gnus manual described, if you have one Maildir server, you only
need to specific its directory once. All its subdirectories would be
treated as groups in Gnus.

More importantly, I don't find 'karlderletzte' as a directory in your
config. The way you set the maildir up may have something to do with the
filenames in the karlderletzte folder. That this directory has even more
subdirectories which look like maildir directories is also peculiar.

>
>  (directory-files 
> nnheader-directory-files-safe)
>  (get-new-mail t)
>  )
>  
>> Eric Abrahamsen  writes:
>>
>> Hello,
>> hmmh i checked these messages and gnus displayed them correctly.
>> BUT what i see is that ONLY meesages inside my directory "Lokales" got
>> errors.
>> This directory contains all messages, which are moved from me (gnus
>> command B m) inside subfolders. All these subfolders are in format
>> nnmaildir and i got no errors if i moved the messages.

Have you actually used B m to move email to 'karlderletzte/INBOX' or
'karlderletzte/Sent' folder? Or do you use it for other purposes than
moving email manually into it? Perhaps splitting? Caching?

It would make things a bit more clear if you could let us know if you
configured this karlderletzte folder for some other use. Please have a
look at your Emacs, gnus, notmuch, imap server if any, offlineimap/isync
if any, and backup script if any, configs, and see whether any of them
mentioned 'karlderletzte'.

If you are using macOS or BSD, you can use grep from within Emacs like
this to help you find those lines:

  C-x d ~/path/to/your/config RET
  M-x grep RET
  grep -nHr --null -e 'karlderletzte' * RET
   this part may have been prefilled for you except
  for the 'r' argument for recursive search, just modify it to your need

If you find anything perhaps it would help us figure out why those file
names become malformed and cause nnir to fail.

>>
>> the directory Maildirnm is my imap folder. Here are all accounts with
>> all folders from my imap accounts. Here searching with G G works.
>>
>> In directory Lokales G G gives the reported error.
>>
>> Perhaps this helps.
>>
>> Regards
>> Poul
>
> ___
> info-gnus-english mailing list
> info-gnus-english@gnu.org
> https://lists.gnu.org/mailman/listinfo/info-gnus-english


___
info-gnus-english mailing 

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-17 Thread physiculus
physiculus  writes:

Hello,
additional note:
here is my config for Lokales. Exactly spoken its Lokal.


(nnmaildir "Lokal"
 (directory "~/Maildirnm")
 (directory 
"~/Maildirnm/archive")
 (directory 
"~/Maildirnm/attachments")
 (directory 
"~/Maildirnm/BugsandFeatures")
 (directory "~/Maildirnm/bwp")
 (directory 
"~/Maildirnm/Campact")
 (directory "~/Maildirnm/draft")
 (directory 
"~/Maildirnm/drafts")
 (directory "~/Maildirnm/Ebay")
 (directory 
"~/Maildirnm/Ebay_noch_suchen")
 (directory "~/Maildirnm/Emacs")
 (directory "~/Maildirnm/emms")
 (directory 
"~/Maildirnm/Enteignung")
 (directory 
"~/Maildirnm/Feedburner")
 (directory "~/Maildirnm/fritz")
 (directory 
"~/Maildirnm/Garten")
 (directory "~/Maildirnm/gnus")
 (directory 
"~/Maildirnm/Held_Wichtig")
 (directory "~/Maildirnm/inbox")
 (directory 
"~/Maildirnm/Informatik")
 (directory 
"~/Maildirnm/Instructables")
 (directory 
"~/Maildirnm/Lehrerausbildung")
 (directory 
"~/Maildirnm/Linzessin")
 (directory 
"~/Maildirnm/logins")
 (directory 
"~/Maildirnm/mnp-notes")
 (directory "~/Maildirnm/mu")
 (directory 
"~/Maildirnm/notmuch")
 (directory 
"~/Maildirnm/OrgDigest")
 (directory 
"~/Maildirnm/Orgmode")
 (directory 
"~/Maildirnm/Papyrus")
 (directory 
"~/Maildirnm/Physik")
 (directory 
"~/Maildirnm/Politik")
 (directory 
"~/Maildirnm/Privat")
 (directory "~/Maildirnm/ProT")
 (directory "~/Maildirnm/queue")
 (directory 
"~/Maildirnm/rclone")
 (directory 
"~/Maildirnm/Sammelpost")
 (directory "~/Maildirnm/sent")
 (directory "~/Maildirnm/SMS")
 (directory "~/Maildirnm/Spam")
 (directory 
"~/Maildirnm/Später")
 (directory 
"~/Maildirnm/SteuerNews")
 (directory "~/Maildirnm/Strom")
 (directory "~/Maildirnm/trash")
 (directory 
"~/Maildirnm/Wanderlust")
 (directory 
"~/Maildirnm/Wichtig")
 (directory 
"~/Maildirnm/ZuErledigen")
 (directory 
"~/Maildirnm/Privat")

 (directory-files 
nnheader-directory-files-safe)
 (get-new-mail t)
 )
 
> Eric Abrahamsen  writes:
>
> Hello,
> hmmh i checked these messages and gnus displayed them correctly.
> BUT what i see is that ONLY meesages inside my directory "Lokales" got
> errors.
> This directory contains all messages, which are moved from me (gnus
> command B m) inside subfolders. All these subfolders are in format
> nnmaildir and i got no errors if i moved the messages.
>
> the directory Maildirnm is my imap folder. Here are all accounts with
> all folders from my imap accounts. Here searching with G G works.
>
> In directory Lokales G G gives the reported error.
>
> 

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-17 Thread physiculus
Eric Abrahamsen  writes:

Hello,
hmmh i checked these messages and gnus displayed them correctly.
BUT what i see is that ONLY meesages inside my directory "Lokales" got
errors.
This directory contains all messages, which are moved from me (gnus
command B m) inside subfolders. All these subfolders are in format
nnmaildir and i got no errors if i moved the messages.

the directory Maildirnm is my imap folder. Here are all accounts with
all folders from my imap accounts. Here searching with G G works.

In directory Lokales G G gives the reported error.

Perhaps this helps.

Regards
Poul


> physiculus  writes:
>
>> xuqi  writes:
>>
>> Hello,
>> thank you and Eric very much for help. I can't help, because i do not fully
>> understand, what goes wrong.
>
> No, that's perfect! That basically confirms my suspicion that some of
> your message filenames are causing nnmaildir to fail. They're probably
> these:
>
> /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
> /home/held/Maildirnm/karlderletzte/Sent/cur/1554294638.4676_1518.shinri,U=23!2,S
> /home/held/Maildirnm/karlderletzte/INBOX/cur/1554292397.3889_1547.shinri,U=645:2,RS
>
> I'll open a bug report and see if anyone else can help. My last question
> for you is: do you think Gnus/nnmaildir made these files, or is there a
> chance that you're just using Gnus to read a maildir installation that
> was created by a different program?
>
> Eric

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-16 Thread Eric Abrahamsen
physiculus  writes:

> xuqi  writes:
>
> Hello,
> thank you and Eric very much for help. I can't help, because i do not fully
> understand, what goes wrong.

No, that's perfect! That basically confirms my suspicion that some of
your message filenames are causing nnmaildir to fail. They're probably
these:

/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
/home/held/Maildirnm/karlderletzte/Sent/cur/1554294638.4676_1518.shinri,U=23!2,S
/home/held/Maildirnm/karlderletzte/INBOX/cur/1554292397.3889_1547.shinri,U=645:2,RS

I'll open a bug report and see if anyone else can help. My last question
for you is: do you think Gnus/nnmaildir made these files, or is there a
chance that you're just using Gnus to read a maildir installation that
was created by a different program?

Eric

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-16 Thread physiculus
xuqi  writes:

Hello,
thank you and Eric very much for help. I can't help, because i do not fully
understand, what goes wrong.

here is the list:

(["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] ["nnmaildir+Lokal:logins" 59 0] ["nnmaildir+Lokal:Privat" 242 0]
["nnmaildir+Lokal:Privat" 231 0] ["nnmaildir+Lokal:Privat" 125 0]
["nnmaildir+Lokal:Privat" 314 0] ["nnmaildir+Lokal:Privat" 291 0]
["nnmaildir+Lokal:ZuErledigen" 411 0] ["nnmaildir+Lokal:Privat" 385 0]
["nnmaildir+Lokal:ZuErledigen" 319 0] ["nnmaildir+Lokal:ZuErledigen" 155
0] ["nnmaildir+Lokal:Privat" 157 0] ["nnmaildir+Lokal:Privat" 310 0]
["nnmaildir+Lokal:ZuErledigen" 492 0] ["nnmaildir+Lokal:Privat" 109 0]
["nnmaildir+Lokal:Privat" 409 0] ["nnmaildir+Lokal:Privat" 500 0]
["nnmaildir+Lokal:Privat" 209 0] ["nnmaildir+Lokal:Privat" 295 0]
["nnmaildir+Lokal:Privat" 255 0] ["nnmaildir+Lokal:Privat" 398 0]
["nnmaildir+Lokal:Privat" 367 0] ["nnmaildir+Lokal:Privat" 36 0]
["nnmaildir+Lokal:Privat" 484 0] ["nnmaildir+Lokal:Privat" 303 0]
["nnmaildir+Lokal:Privat" 189 0] ["nnmaildir+Lokal:Privat" 187 0]
["nnmaildir+Lokal:ZuErledigen" 346 0] ["nnmaildir+Lokal:Privat" 542 0]
["nnmaildir+Lokal:Privat" 144 0] ["nnmaildir+Lokal:Privat" 16 0]
["nnmaildir+Lokal:Privat" 509 0] ["nnmaildir+Lokal:Privat" 182 0]
["nnmaildir+Lokal:Privat" 72 0] ["nnmaildir+Lokal:Privat" 108 0]
["nnmaildir+Lokal:Privat" 471 0] ["nnmaildir+Lokal:Privat" 22 0]
["nnmaildir+Lokal:Privat" 181 0] ["nnmaildir+Lokal:Orgmode" 8316 0]
["nnmaildir+Lokal:Orgmode" 6221 0] ["nnmaildir+Lokal:karlderletzte.Sent"
nil 0] ["nnmaildir+Lokal:karlderletzte.INBOX" nil 0]
["nnmaildir+Lokal:karlderletzte.Sent" nil 0]
["nnmaildir+Lokal:karlderletzte.INBOX" nil 0] ["nnmaildir+Lokal:Privat"
670 0] ["nnmaildir+Lokal:Privat" 669 0] ["nnmaildir+Lokal:Privat" 668
0])

> physiculus  writes:
>
>
> 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

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-15 Thread Eric Abrahamsen
physiculus  writes:

> Eric Abrahamsen  writes:
>
> Ok, here is the list. Hope it helps :-)
>

[...]

> /home/held/Maildirnm/karlderletzte/Sent/cur/1554294583.6ad7d1c538e8c734.shinri:2,,U=22:2,S!2,S
> /home/held/Maildirnm/karlderletzte/Sent/cur/1554294638.4676_1518.shinri,U=23!2,S

[...]

I haven't spent a whole lot of time with the maildir file format, but
neither of these look like legal maildir filenames to me. The first has
two colons, the second has none, and I don't know what's going on with
the exclamation marks. Even if they're legal I'll bet nnmaildir is
barfing on them. If you run:

(nnir-run-notmuch '((query . "Hock")) "nnmaildir:Lokal" '("karlderletzte/Sent"))

I would expect you to get something like this in *Messages*:

(["nnmaildir+Lokal:karlderletzte/Sent" nil 0]
 ["nnmaildir+Lokal:karlderletzte/Sent" nil 0]
 ["nnmaildir+Lokal:karlderletzte/Sent" nil 0])

Is that correct?

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-15 Thread xuqi
physiculus  writes:

> Eric Abrahamsen  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  writes:
>>
>>> Eric Abrahamsen  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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-15 Thread physiculus
Eric Abrahamsen  writes:

Ok, here is the list. Hope it helps :-)

/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
/home/held/Maildirnm/karlderletzte/Sent/cur/1554294638.4676_1518.shinri,U=23!2,S
/home/held/Maildirnm/karlderletzte/INBOX/cur/1554292397.3889_1547.shinri,U=645:2,RS
/home/held/Maildirnm/karlderletzte/Sent/cur/1554280492.2358_1468.shinri,U=21:2,S!2,S
/home/held/Maildirnm/Privat/cur/1547397044.22850_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397028.20987_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397075.26578_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397037.21967_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397034.21560_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397044.22861_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397079.27064_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397028.20899_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397040.22375_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397082.27482_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396223.5196_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397045.22919_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397045.22941_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397057.24413_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397076.26744_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397030.21141_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397064.25177_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397067.25588_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397051.23775_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397055.24309_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397047.23183_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397078.26964_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397069.25732_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397037.21978_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396236.6916_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397058.24491_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397042.22551_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396206.3050_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396221.4874_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397066.25422_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396228.5956_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397055.24234_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397058.24546_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397039.22155_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397049.23466_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397050.23598_1.shinri:2,S
/home/held/Maildirnm/logins/cur/1547396690.6373_1.shinri:2,S
/home/held/Maildirnm/logins/cur/1547396699.8236_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396195.1584_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396216.4287_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396221.4860_1.shinri:2,S
/home/held/Maildirnm/Linzessin/cur/1547396282.13712_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396213.3845_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396204.2775_1.shinri:2,S
/home/held/Maildirnm/ZuErledigen/cur/1547396227.5806_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397060.24778_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397079.27030_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397072.26225_1.shinri:2,S
/home/held/Maildirnm/Privat/cur/1547397062.24966_1.shinri:2,S

> physiculus  writes:
>
>> Eric Abrahamsen  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] ...)
>
> 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?
>
>
> ___
> info-gnus-english mailing 

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread Eric Abrahamsen
physiculus  writes:

> Eric Abrahamsen  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] ...)

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?


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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread physiculus
Eric Abrahamsen  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] ...)

>
> This should be (nnir-run-notmuch '((query . "Hock")) "nnmaildir:Lokal")
>
> You'll probably want to run (switch-to-buffer nnir-tmp-buffer)
> afterwards, I don't think it will display the results by default.
>
> 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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread Eric Abrahamsen
physiculus  writes:

> xuqi  writes:
>
> hello,
> yes the prefix is correct.
> nnir-notmuch-remove-prefix is a variable defined in `nnir.el'.
> Its value is "/home/held/Maildirnm/"
>
>>
>> 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")
> this gives ?
> Debugger entered--Lisp error: (wrong-type-argument listp "Hock")

This should be (nnir-run-notmuch '((query . "Hock")) "nnmaildir:Lokal")

You'll probably want to run (switch-to-buffer nnir-tmp-buffer)
afterwards, I don't think it will display the results by default.

Eric


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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread physiculus
xuqi  writes:

hello,
yes the prefix is correct.
nnir-notmuch-remove-prefix is a variable defined in `nnir.el'.
Its value is "/home/held/Maildirnm/"

>
> 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")
this gives ?
Debugger entered--Lisp error: (wrong-type-argument listp "Hock")
  nnir-run-notmuch("Hock" "nnmaildir:Lokal")
  eval((nnir-run-notmuch "Hock" "nnmaildir:Lokal") nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Is this meaningful for you?

Regards
Poul


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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread xuqi
physiculus  writes:

> xuqi  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  writes:
>>
>>> Eric Abrahamsen  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")
>>>   

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread physiculus
Eric Abrahamsen  writes:

Hello,
i cut the output for readability. 

How do i edebug the function?
I don't know this...

Regards
Poul

> physiculus  writes:
>
>> Eric Abrahamsen  writes:
>>
>> Hello,
>>
>> here is the output from the debugger.
>> I dont know, what it mean, but i think you do :-)
>
> Not quite :) There seem to be nil values in the list of found articles
> returned by the notmuch search backend.
>
> Are you able to trigger the error with a search that returns fewer
> results? In your previous message, the output of the notmuch CLI command
> only contains seven results, but the elisp backtrace shows it trying to
> fetch headers for more than 50 articles. Are those the exact same
> searches?
>
> Can you edebug the function `nnir-retrieve-headers', start the search
> again, and when the edebugger starts hit "e", then "(setq abg
> nnir-artlist)", then in a followup to this message paste the value of
> the `abg' variable?
>
> Eric

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-14 Thread physiculus
xuqi  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?

Regards
Poul


> physiculus  writes:
>
>> Eric Abrahamsen  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  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
>
>
> 

Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-13 Thread xuqi
physiculus  writes:

> Eric Abrahamsen  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  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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-13 Thread Eric Abrahamsen
physiculus  writes:

> Eric Abrahamsen  writes:
>
> Hello,
>
> here is the output from the debugger.
> I dont know, what it mean, but i think you do :-)

Not quite :) There seem to be nil values in the list of found articles
returned by the notmuch search backend.

Are you able to trigger the error with a search that returns fewer
results? In your previous message, the output of the notmuch CLI command
only contains seven results, but the elisp backtrace shows it trying to
fetch headers for more than 50 articles. Are those the exact same
searches?

Can you edebug the function `nnir-retrieve-headers', start the search
again, and when the edebugger starts hit "e", then "(setq abg
nnir-artlist)", then in a followup to this message paste the value of
the `abg' variable?

Eric

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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-13 Thread physiculus
Eric Abrahamsen  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)
  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  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


Re: nnir with notmuch gives error; sort: Wrong type argument: number-or-marker-p, nil

2020-03-12 Thread Eric Abrahamsen
physiculus  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