Function: nntp-finish-retrieve-group-infos

nntp-finish-retrieve-group-infos is a byte-compiled function defined in nntp.el.gz.

Signature

(nntp-finish-retrieve-group-infos SERVER INFOS COUNT)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nntp.el.gz
(deffoo nntp-finish-retrieve-group-infos (server infos count)
  (nntp-with-open-group nil server
    (let ((buf (nntp-find-connection-buffer nntp-server-buffer))
	  (method (gnus-find-method-for-group
		   (gnus-info-group (car infos))
		   (car infos)))
	  (received 0)
	  (last-point 1))
      (with-current-buffer buf
	(setq nntp-retrieval-in-progress nil))
      (when (and buf
		 count)
	(with-current-buffer buf
	  (while (and (gnus-buffer-live-p buf)
		      (progn
			(goto-char last-point)
			;; Count replies.
			(while (re-search-forward
				(if nntp-server-list-active-group
				    "^[.]"
				  "^[0-9]")
				nil t)
			  (cl-incf received))
			(setq last-point (point))
			(< received count)))
	    (nntp-accept-response))
	  ;; We now have all the entries.  Remove CRs.
	  (nnheader-strip-cr)
	  (if (not nntp-server-list-active-group)
	      (progn
		(nntp-copy-to-buffer nntp-server-buffer
				     (point-min) (point-max))
		(with-current-buffer nntp-server-buffer
		  (gnus-groups-to-gnus-format method gnus-active-hashtb t)))
	    ;; We have read active entries, so we just delete the
	    ;; superfluous gunk.
	    (goto-char (point-min))
	    (while (re-search-forward "^[.2-5]" nil t)
	      (delete-region (match-beginning 0)
			     (progn (forward-line 1) (point))))
	    (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max))
	    (with-current-buffer nntp-server-buffer
	      (gnus-active-to-gnus-format
	       ;; Kludge to use the extended method name if you have
	       ;; an extended one.
	       (if (consp (gnus-info-method (car infos)))
		   (gnus-info-method (car infos))
		 method)
	       gnus-active-hashtb nil t))))))))