Function: gnus-group-delete-group

gnus-group-delete-group is an interactive and byte-compiled function defined in gnus-group.el.gz.

Signature

(gnus-group-delete-group GROUP &optional FORCE NO-PROMPT)

Documentation

Delete the current group. Only meaningful with editable groups.

If FORCE (the prefix) is non-nil, all the articles in the group will be deleted. This is "deleted" as in "removed forever from the face of the Earth". There is no undo. The user will be prompted before doing the deletion.

Note that you also have to specify FORCE if you want the group to be removed from the server, even when it's empty.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
(defun gnus-group-delete-group (group &optional force no-prompt)
  "Delete the current group.  Only meaningful with editable groups.
If FORCE (the prefix) is non-nil, all the articles in the group will
be deleted.  This is \"deleted\" as in \"removed forever from the face
of the Earth\".  There is no undo.  The user will be prompted before
doing the deletion.

Note that you also have to specify FORCE if you want the group to
be removed from the server, even when it's empty."
  (interactive (list (gnus-group-group-name) current-prefix-arg)
	       gnus-group-mode)
  (unless group
    (error "No group to delete"))
  (unless (gnus-check-backend-function 'request-delete-group group)
    (error "This back end does not support group deletion"))
  (prog1
      (when (or no-prompt
		(gnus-yes-or-no-p
		 (format
		  "Do you really want to delete %s%s? "
		  group (if force " and all its contents" ""))))
	(gnus-message 6 "Deleting group %s..." group)
	(if (not (gnus-request-delete-group group force))
	    (gnus-error 3 "Couldn't delete group %s" group)
	  (gnus-message 6 "Deleting group %s...done" group)
	  (gnus-group-goto-group group)
	  (gnus-group-kill-group 1 t)
	  (gnus-set-active group nil)
	  t))
    (gnus-group-position-point)))