Function: gnus-read-ephemeral-gmane-group

gnus-read-ephemeral-gmane-group is an interactive and byte-compiled function defined in gnus-group.el.gz.

Signature

(gnus-read-ephemeral-gmane-group GROUP START &optional RANGE)

Documentation

Read articles from Gmane group GROUP as an ephemeral group.

START is the first article. RANGE specifies how many articles are fetched. The articles are downloaded via HTTP using the URL specified by gnus-gmane-group-download-format.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
;; FIXME:
;; - Add documentation, menu, key bindings, ...

(defun gnus-read-ephemeral-gmane-group (group start &optional range)
  "Read articles from Gmane group GROUP as an ephemeral group.
START is the first article.  RANGE specifies how many articles
are fetched.  The articles are downloaded via HTTP using the URL
specified by `gnus-gmane-group-download-format'."
  ;; See <http://gmane.org/export.php> for more information.
  (interactive
   (list
    (gnus-group-completing-read "Gmane group")
    (read-number "Start article number: ")
    (read-number "How many articles: "))
   gnus-group-mode)
  (unless range (setq range 500))
  (when (< range 1)
    (error "Invalid range: %s" range))
  (let ((tmpfile (make-temp-file
		  (format "%s.start-%s.range-%s." group start range)))
	(gnus-thread-sort-functions '(gnus-thread-sort-by-number)))
    (with-temp-file tmpfile
      (url-insert-file-contents
       (format gnus-gmane-group-download-format
	       group start (+ start range))
       t)
      ;; `url-insert-file-contents' sets this because of the 2nd arg.
      (setq buffer-file-name nil)
      (write-region (point-min) (point-max) tmpfile)
      (gnus-group-read-ephemeral-group
       (format "nndoc+ephemeral:%s.start-%s.range-%s" group start range)
       `(nndoc ,tmpfile
	       (nndoc-article-type mbox))))
    (delete-file tmpfile)))