Function: nnbabyl-check-mbox

nnbabyl-check-mbox is an interactive and byte-compiled function defined in nnbabyl.el.gz.

Signature

(nnbabyl-check-mbox)

Documentation

Go through the nnbabyl mbox and make sure that no article numbers are reused.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnbabyl.el.gz
(defun nnbabyl-check-mbox ()
  "Go through the nnbabyl mbox and make sure that no article numbers are reused."
  (interactive)
  (let ((idents (gnus-make-hashtable 1000))
	id)
    (save-excursion
      (unless (buffer-live-p nnbabyl-mbox-buffer)
	(nnbabyl-read-mbox))
      (set-buffer nnbabyl-mbox-buffer)
      (goto-char (point-min))
      (while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) "  nil t)
	(if (gethash (setq id (match-string 1)) idents)
	    (progn
	      (delete-region (point-at-bol) (progn (forward-line 1) (point)))
	      (nnheader-message 7 "Moving %s..." id)
	      (nnbabyl-save-mail
	       (nnmail-article-group 'nnbabyl-active-number)))
	  (puthash id t idents)))
      (when (buffer-modified-p (current-buffer))
	(save-buffer))
      (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)
      (nnheader-message 5 ""))))