Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-group-catchup-current-all fails: gnus-sequence-of-unread-articles
@ 2006-02-27 18:51 Reiner Steib
  0 siblings, 0 replies; only message in thread
From: Reiner Steib @ 2006-02-27 18:51 UTC (permalink / raw)


Hi,

in my Gnus test environment I tried to catchup all groups.  It failed
on the following group which doesn't exist anymore on the server
(local group in leafnode):

,----[ `G E' ]
| ;;; Editing the group info for `local.newsletters.test'.
| ;; Type `C-c C-c' after you've finished editing.
| 
| ("local.newsletters.test" 6
|  ((1 . 292))
|  nil)
`----

,----[ Debugger output with patch[1] ]
| Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
|   <(293 nil)
|   (cond ((< first last) (push ... unread)) ((= first last) (push first unread)))
|   (let* ((read ...) (active ...) (last ...) first nlast unread)
|   (gnus-message 1 "RS: group=%s\nRS: read=%s active=%s last=%s"
|     group read active last) (if (not read) (setq first ...) (if
|     ... ... ... ...)) (gnus-message 1 "RS: first=%s last=%s" first last)
|     (cond (... ...) (... ...)) (delq 0 (nreverse unread)))
|   gnus-sequence-of-unread-articles("local.newsletters.test")
|   gnus-group-catchup("local.newsletters.test" all)
|   gnus-group-catchup-current(nil all)
|   gnus-group-catchup-current-all(nil)
|   call-interactively(gnus-group-catchup-current-all)
`----

The problem is that the code in `gnus-sequence-of-unread-articles'
doesn't ensure that `first' and `last' are both numbers:

,----[ M-: (gnus-sequence-of-unread-articles "local.test") RET with [1] ]
| gnus-sequence-of-unread-articles
| RS: group=local.newsletters.test
| RS: read=((1 . 292)) active=nil last=nil
| RS: first=293 last=nil
| Entering debugger...
`----

What value should `gnus-sequence-of-unread-articles' return in such a
situation?

*time passes*

After a little testing, I conclude that it should return `nil'.  Fixed
in CVS.

Bye, Reiner.

[1]
--8<---------------cut here---------------start------------->8---
--- gnus-sum.el	23 Feb 2006 20:30:28 -0000	7.117
+++ gnus-sum.el	27 Feb 2006 18:05:11 -0000
@@ -6626,6 +6626,8 @@
 	 (active (or (gnus-active group) (gnus-activate-group group)))
 	 (last (cdr active))
 	 first nlast unread)
+    (gnus-message 1 "RS: group=%s\nRS: read=%s active=%s last=%s"
+		  group read active last)
     ;; If none are read, then all are unread.
     (if (not read)
 	(setq first (car active))
@@ -6648,6 +6650,8 @@
 	  (setq first (1+ (if (atom (car read)) (car read) (cdar read))))
 	  (setq nlast (if (atom (cadr read)) (cadr read) (caadr read)))
 	  (setq read (cdr read)))))
+    ;; FIXME: Make sure that first and last are integers (non-nil).
+    (gnus-message 1 "RS: first=%s last=%s" first last)
     ;; And add the last unread articles.
     (cond ((< first last)
            (push (cons first last) unread))
--8<---------------cut here---------------end--------------->8---
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-27 18:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-27 18:51 gnus-group-catchup-current-all fails: gnus-sequence-of-unread-articles Reiner Steib

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