Function: gnus-group-read-ephemeral-group
gnus-group-read-ephemeral-group is an interactive and byte-compiled
function defined in gnus-group.el.gz.
Signature
(gnus-group-read-ephemeral-group GROUP METHOD &optional ACTIVATE QUIT-CONFIG REQUEST-ONLY SELECT-ARTICLES PARAMETERS NUMBER)
Documentation
Read GROUP from METHOD as an ephemeral group.
If ACTIVATE, request the group first. If QUIT-CONFIG, use that Gnus window configuration name when exiting from the ephemeral group. If REQUEST-ONLY, don't actually read the group; just request it. If SELECT-ARTICLES, only select those articles. If PARAMETERS, use those as the group parameters. If NUMBER, fetch this number of articles.
Return the name of the group if selection was successful.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
;; Enter a group that is not in the group buffer. Non-nil is returned
;; if selection was successful.
(defun gnus-group-read-ephemeral-group (group method &optional activate
quit-config request-only
select-articles
parameters
number)
"Read GROUP from METHOD as an ephemeral group.
If ACTIVATE, request the group first.
If QUIT-CONFIG, use that Gnus window configuration name when
exiting from the ephemeral group.
If REQUEST-ONLY, don't actually read the group; just request it.
If SELECT-ARTICLES, only select those articles.
If PARAMETERS, use those as the group parameters.
If NUMBER, fetch this number of articles.
Return the name of the group if selection was successful."
(interactive
(list
;; (gnus-read-group "Group name: ")
(gnus-group-completing-read)
(gnus-read-method "From method")))
(unless (gnus-alive-p)
(nnheader-init-server-buffer)
;; Necessary because of funky inlining.
(require 'gnus-cache)
(setq gnus-newsrc-hashtb (gnus-make-hashtable 100)
gnus-active-hashtb (gnus-make-hashtable 100)))
;; Transform the select method into a unique server.
(when (stringp method)
(setq method (gnus-server-to-method method)))
(let ((address-slot
(intern (format "%s-address" (car method)))))
(setq method
(if (assq address-slot (cddr method))
`(,(car method) ,(concat (cadr method) "-ephemeral")
,@(cddr method))
`(,(car method) ,(concat (cadr method) "-ephemeral")
(,address-slot ,(cadr method))
,@(cddr method)))))
(let ((group (if (gnus-group-foreign-p group) group
(gnus-group-prefixed-name (gnus-group-real-name group)
method))))
(gnus-set-active group nil)
(puthash
group
`(-1 (,group
,gnus-level-default-subscribed nil nil ,method
,(cons
(cons 'quit-config
(cond
(quit-config
quit-config)
((assq gnus-current-window-configuration
gnus-buffer-configuration)
(cons gnus-summary-buffer
gnus-current-window-configuration))
(t
(cons (current-buffer)
(current-window-configuration)))))
parameters)))
gnus-newsrc-hashtb)
(push method gnus-ephemeral-servers)
(when (gnus-buffer-live-p gnus-group-buffer)
(set-buffer gnus-group-buffer))
(unless (gnus-check-server method)
(error "Unable to contact server: %s" (gnus-status-message method)))
(when activate
(gnus-activate-group group 'scan)
(unless (gnus-request-group group)
(error "Couldn't request group: %s"
(nnheader-get-report (car method)))))
(if request-only
group
(condition-case ()
(when (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup)
(gnus-fetch-old-headers
gnus-fetch-old-ephemeral-headers))
(gnus-group-read-group (or number t) t group select-articles))
group)
(quit
(if debug-on-quit
(debug "Quit")
(message "Quit reading the ephemeral group"))
nil)))))