Function: gnus-group-compact-group

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

Signature

(gnus-group-compact-group GROUP)

Documentation

Compact the current group.

Compaction means removing gaps between article numbers. Hence, this operation is only meaningful for back ends using one file per article
(e.g. nnml).

Note: currently only implemented in nnml.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
;;;
;;; Group compaction. -- dvl
;;;

(defun gnus-group-compact-group (group)
  "Compact the current group.
Compaction means removing gaps between article numbers.  Hence, this
operation is only meaningful for back ends using one file per article
\(e.g. nnml).

Note: currently only implemented in nnml."
  (interactive (list (gnus-group-group-name)) gnus-group-mode)
  (unless group
    (error "No group to compact"))
  (unless (gnus-check-backend-function 'request-compact-group group)
    (error "This back end does not support group compaction"))
  (gnus-message 6 "\
Compacting group %s... (this may take a long time)"
		group)
  (prog1
      (if (not (gnus-request-compact-group group))
	  (gnus-error 3 "Couldn't compact group %s" group)
	(gnus-message 6 "Compacting group %s...done" group)
	t)
    ;; Invalidate the "original article" buffer which might be out of date.
    ;; #### NOTE: Yes, this might be a bit rude, but since compaction
    ;; #### will not happen very often, I think this is acceptable.
    (gnus-kill-buffer gnus-original-article-buffer)
    ;; Update the group line to reflect new information (art number etc).
    (gnus-group-update-group-line)))