Function: gnus-agent-get-group-info

gnus-agent-get-group-info is a byte-compiled function defined in gnus-agent.el.gz.

Signature

(gnus-agent-get-group-info METHOD GROUP)

Documentation

Get single group's active range in agent's copy of server's active file.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-agent.el.gz
(defun gnus-agent-get-group-info (method group)
  "Get single group's active range in agent's copy of server's active file."
  (when (gnus-agent-method-p method)
    (let* ((gnus-command-method (or method gnus-command-method))
	   (coding-system-for-write nnheader-file-coding-system)
	   (file-name-coding-system nnmail-pathname-coding-system)
	   (file (gnus-agent-lib-file "active"))
	   oactive-min oactive-max)
      (gnus-make-directory (file-name-directory file))
      (with-temp-buffer
	;; Emacs got problem to match non-ASCII group in multibyte buffer.
	;(mm-disable-multibyte)
	(when (file-exists-p file)
	  (nnheader-insert-file-contents file)

          (goto-char (point-min))
          (when (re-search-forward
                 (concat "^" (regexp-quote group) " ") nil t)
            (save-excursion
              (setq oactive-max (read (current-buffer))	;; max
                    oactive-min (read (current-buffer))) ;; min
	      (cons oactive-min oactive-max))))))))