From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57999 Path: main.gmane.org!not-for-mail From: "Ted Zlatanov" Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus registry woes Date: 29 Jun 2004 14:21:30 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nsmce5iol.fsf@lifelogs.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088534422 13726 80.91.224.253 (29 Jun 2004 18:40:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 18:40:22 +0000 (UTC) Original-X-From: ding-owner+M6541@lists.math.uh.edu Tue Jun 29 20:40:14 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BfNWf-0001hP-00 for ; Tue, 29 Jun 2004 20:40:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BfNWW-0004aB-00; Tue, 29 Jun 2004 13:40:04 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BfNWR-0004a2-00 for ding@lists.math.uh.edu; Tue, 29 Jun 2004 13:39:59 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BfNWR-0003XL-4u for ding@lists.math.uh.edu; Tue, 29 Jun 2004 13:39:59 -0500 Original-Received: from mail.bwh.harvard.edu (sysblade0.bwh.harvard.edu [134.174.9.44]) by justine.libertine.org (Postfix) with ESMTP id C07573A01EE for ; Tue, 29 Jun 2004 13:39:58 -0500 (CDT) Original-Received: (qmail 7027 invoked from network); 29 Jun 2004 18:33:15 -0000 Envelope-Sender: tzz@lifelogs.com Envelope-Recipients: ding@gnus.org, Original-Received: from asimov.bwh.harvard.edu (HELO asimov) ([134.174.9.63]) (envelope-sender ) by mail.bwh.harvard.edu (qmail-ldap-1.03) with SMTP for ; 29 Jun 2004 18:33:15 -0000 Mail-Followup-To: "Ding Mailing List" Original-To: "Ding Mailing List" X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" In-Reply-To: (Norbert Koch's message of "Tue, 29 Jun 2004 11:21:30 +0200") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57999 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57999 On Tue, 29 Jun 2004, viteno@xemacs.org wrote: > I've had a go at the registry today. Now, I'm no longer able to save > my Gnus buffers. I get the following error: > > Signaling: (wrong-type-argument natnump -2497) > gnus-registry-trim((("<20040629090742.GE74930@atrbg11.informatik.tu-muenchen.de>" > (...) "nnml:bsd-current") > ("<1152675CA9EDD71187130002B3CE5ADA090BA9F4@hoexc010.ukrtelecom.net>" > (...) "nnml:bsd-current") ("<87n02msp6d.fsf@free.fr>" (...) > "nnml:lilypond"))) > gnus-registry-save() > run-hooks(gnus-registry-save) > apply(run-hooks gnus-registry-save) > gnus-run-hooks(gnus-save-newsrc-hook) > gnus-save-newsrc-file(nil) > gnus-group-save-newsrc(nil) > call-interactively(gnus-group-save-newsrc) Here's the function in question: (defun gnus-registry-trim (alist) "Trim alist to size, using gnus-registry-max-entries." (if (null gnus-registry-max-entries) alist ; just return the alist ;; else, when given max-entries, trim the alist (let ((timehash (make-hash-table :size 4096 :test 'equal))) (maphash (lambd a(key value) (puthash key (gnus-registry-fetch-extra key 'mtime) timehash)) gnus-registry-hashtb) ;; we use the return value of this setq, which is the trimmed alist (setq alist (nthcdr (- (length alist) gnus-registry-max-entries) (sort alist (lambda (a b) (time-less-p (cdr (gethash (car a) timehash)) (cdr (gethash (car b) timehash)))))))))) So basically we sort the alist and then take only the needed number of entries from it. I would guess the natnump error, which I have never seen before, is coming from an invalid mtime. Can you trace the error deeper with (debug) statements inside the lambda function above? Alternatively, can you send me your registry file, if the error is repeatable from it? Thanks Ted