Gnus development mailing list
 help / color / mirror / Atom feed
* (gnus-data-list nil) does not give valid data sometimes
@ 2004-01-08 22:51 Ted Zlatanov
  2004-01-09  0:58 ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2004-01-08 22:51 UTC (permalink / raw)


The function that fails is:

(defun spam-fetch-field-fast (article field)
  "Fetch a field quickly, using the internal gnus-data-list function"
  (when (numberp article)
    (gnus-get-newsgroup-headers)
    (let* ((header (assoc article (gnus-data-list nil)))
	   (data-header (if header (gnus-data-header header) nil)))
      (if (arrayp data-header)
	(cond
	 ((equal field 'from)
	  (mail-header-from data-header))
	 ((equal field 'message-id)
	  (mail-header-message-id data-header))
	 ((equal field 'subject)
	  (mail-header-subject data-header))
	 ((equal field 'references)
	  (mail-header-references data-header))
	 ((equal field 'date)
	  (mail-header-date data-header))
	 ((equal field 'xref)
	  (mail-header-xref data-header))
	 ((equal field 'extra)
	  (mail-header-extra data-header))
	 (t
	  nil))
	(gnus-error 5 "Article %d has a nil data header" article)))))

When entering a group the first time, lots of errors are generated
above because data-header is nil.  After C-g, the next time the group
is entered everything is fine.  BUT the next time (3rd time) the
group is entered, the errors happen again - and so on, this can be
repeated forever.  I don't use the agent - I'm not sure what's wrong.

This, by the way, is called by spam-insert-fake-headers which is
called by spam-find-spam; spam-find-spam is hooked on
gnus-summary-prepare-hook.

Thanks
Ted



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

end of thread, other threads:[~2004-01-09 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-08 22:51 (gnus-data-list nil) does not give valid data sometimes Ted Zlatanov
2004-01-09  0:58 ` Ted Zlatanov
2004-01-09 18:43   ` bug/feature?: gnus-data-list is not ready in gnus-summary-prepare-hook (was: (gnus-data-list nil) does not give valid data sometimes) Ted Zlatanov
2004-01-09 21:41     ` bug/feature?: gnus-data-list is not ready in Ted Zlatanov

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