Gnus development mailing list
 help / color / mirror / Atom feed
* broken cache causes wrong-type-argument error when selecting an nnimap group
@ 2016-09-05 15:40 TSUCHIYA Masatoshi
  2016-10-05 16:38 ` Thorsten Jolitz
  0 siblings, 1 reply; 6+ messages in thread
From: TSUCHIYA Masatoshi @ 2016-09-05 15:40 UTC (permalink / raw)
  To: ding

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

Hi,

I saw the following error message when selecting an nnimap group.

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  gnus-sorted-difference((1928 1929 1930 ...))
  gnus-select-newsgroup("admin.moderator" t nil)
  gnus-summary-read-group-1("admin.moderator" t nil nil nil nil)
  gnus-summary-read-group("admin.moderator" t nil nil nil nil nil)
  gnus-group-read-group(nil)
  call-interactively(gnus-group-read-group nil nil)
  command-execute(gnus-group-read-group)

I think this problem is caused by broken cached headers, because the
attached ad-hoc patch to remove broken cached headers resolves this
problem.  Therefore, if I can remove broken cached headers, the attached
patch is unnecessary.

The problem is that I cannot find the location where the cache is saved.
I have already searched ~/.emacs.d/, ~/.newsrc.eld and the directory
specified by `gnus-cache-directory'.  However, I cannot find it.

Could you give an advise to me?

-- 
TSUCHIYA Masatoshi

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 1101 bytes --]

--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -4147,6 +4147,11 @@ If SELECT-ARTICLES, only select those articles from GROUP."
     (gnus-run-hooks 'gnus-summary-generate-hook)
     ;; Generate the buffer, either with threads or without.
     (when gnus-newsgroup-headers
+      (setq gnus-newsgroup-headers
+	    (delq nil
+		  (mapcar (lambda (h)
+			    (and (integerp (mail-header-number h)) h))
+			  gnus-newsgroup-headers)))
       (gnus-summary-prepare-threads
        (if gnus-show-threads
 	   (gnus-sort-gathered-threads
@@ -5726,8 +5731,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
       (setq gnus-newsgroup-limit (copy-sequence articles))
       ;; Remove canceled articles from the list of unread articles.
       (setq fetched-articles
-	    (mapcar (lambda (headers) (mail-header-number headers))
-		    gnus-newsgroup-headers))
+	    (delq nil (mapcar (lambda (headers) (mail-header-number headers))
+			      gnus-newsgroup-headers)))
       (setq gnus-newsgroup-articles fetched-articles)
       (setq gnus-newsgroup-unreads
 	    (gnus-sorted-nintersection

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-11 13:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 15:40 broken cache causes wrong-type-argument error when selecting an nnimap group TSUCHIYA Masatoshi
2016-10-05 16:38 ` Thorsten Jolitz
2016-10-06 18:59   ` Stig Brautaset
2016-10-07  5:28     ` Adam Sjøgren
2016-10-10 16:31       ` Thorsten Jolitz
2016-10-11 13:56         ` Adam Sjøgren

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).