emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: [bug]Malformed -*- line


From: CHENG Gao
Subject: Re: [bug]Malformed -*- line
Date: Wed, 27 Sep 2006 01:22:27 +0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (darwin)

I trust I found where the problem is, though I dont understand too much.

First I need explain something about Gnus registry.

Gnus registry is used to record spam messages. It records entries till
the number reachs gnus-registry-max-entries. I set it to 2500.

Once gnus-registry-max-entries is reached, it'll trim entries to
max.

As show in my previous message, item like:

(#
("<address@hidden>" 0 40 (auto-composed nil))
((mtime 17689 12640 42339))
"nntp+news.gmane.org:gmane.comp.version-control.arch.user")

is result of ill-treatment of registry entry.

The related funtion is

(defun gnus-registry-trim (alist)
  "Trim alist to size, using gnus-registry-max-entries.
Also, drop all gnus-registry-ignored-groups matches."
  (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
                      (or (cdr (gethash (car a) timehash)) '(0 0 0))
                      (or (cdr (gethash (car b) timehash)) '(0 0 0))))))))))

Please pay attention to lamba function used.

      (maphash
       (lambda (key value)
         (puthash key (gnus-registry-fetch-extra key 'mtime) timehash))
       gnus-registry-hashtb)

key is message-id, and value is a (mtime groupname) list.

I think lambda is ill-translated to literal "#", thus registry file is
corrputed.

I high suspect the error is in lamdba or hash processing in Emacs 23. Is
there anything changed with them? Should a backquote used somewhere?





reply via email to

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