info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Activating gnus-registry in 5.10.6 -> (wrong-type-argument natnump -


From: Ted Zlatanov
Subject: Re: Activating gnus-registry in 5.10.6 -> (wrong-type-argument natnump -2499)
Date: Wed, 06 Oct 2004 14:53:51 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

On Wed, 06 Oct 2004, asjo@koldfront.dk wrote:

> Preparing to try to get the keywords-group-thing going via the
> registry, I tried to enable gnus-registry at work (where I use Gnus
> 5.10.6 on XEmacs 21.4 p6; this article is posted from home).

> Now, when I try to quit Gnus, q, I get an error:
> 
>  Wrong type argument: natnump, -2498

I thought this was fixed in the 5.10 branch.  The fix is in CVS and
should be in 5.10.  The function gnus-registry-trim in 5.10 is:

(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))
           (trim-length (- (length alist) gnus-registry-max-entries))
           (trim-length (if (natnump trim-length) trim-length 0)))
      (maphash
       (lambda (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
             trim-length
             (sort alist 
                   (lambda (a b)
                     (time-less-p 
                      (cdr (gethash (car a) timehash))
                      (cdr (gethash (car b) timehash))))))))))

Does the above work for you?

Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]